UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vZcQDOYm4e10zjpY05ku/LXe1tSW8zvTHCUlkdEyx7g='
WHERE
key_id = 'e179a771b5f6f39131fde35124258b4338890e77327004191574635c916e5add'
AND (
token = 'vZcQDOYm4e10zjpY05ku/LXe1tSW8zvTHCUlkdEyx7g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)