UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F48KGyriz0rKAcm1V8QwuQlEHnpXMwhRT4BWPzHElZQ='
WHERE
key_id = '2aba050d12282f75b9f7550ae74c67fb0daf5e7cecbdad5cd98cb1fce651b101'
AND (
token = 'F48KGyriz0rKAcm1V8QwuQlEHnpXMwhRT4BWPzHElZQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)