SELECT `ESC__ADVERTISING_BANNERS`.* FROM `ESC__ADVERTISING_BANNERS` WHERE (`campaignId` IN ()) AND (published = 1) AND (`languages` IS NULL OR FIND_IN_SET( 'gb', `languages` )) AND (`startDate` IS NULL OR `startDate` <= CURRENT_TIMESTAMP()) AND (`endDate` IS NULL OR `endDate` >= CURRENT_TIMESTAMP()) ORDER BY RAND() LIMIT 1