UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ILH9l7oSEtPdt9DvJW/uXmkv8FtGfbAqKZQ+KTtOm5k='
WHERE
key_id = '7bb33620cc17515865baf06244f811193f7b37632c31ffd2b6c006272a6fdea3'
AND (
token = 'ILH9l7oSEtPdt9DvJW/uXmkv8FtGfbAqKZQ+KTtOm5k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)