UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VHVqfsWn9L41ujl6cc5LMeiV7+jEkwDkPzM/F3InW4s='
WHERE
key_id = '33250c61b4b1c5ba9d03fdba8f3acc7c67d84e58cc8eacfd04fa803501833ae7'
AND (
token = 'VHVqfsWn9L41ujl6cc5LMeiV7+jEkwDkPzM/F3InW4s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)