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