public static function deleteOld($hours)
{
$table = ipTable('email_queue');
$sql = "delete from {$table} where\n (`lock` is not NULL and " . ipDb()->sqlMinAge('lockedAt', $hours, 'HOUR') . ")\n or (`send` is not NULL and " . ipDb()->sqlMinAge('send', $hours, 'HOUR') . ")";
return ipDb()->execute($sql);
}