UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hvk73aTH5F1jGGeCI/xryFvYp3BXKpy3EWP3IRqq7SU='
WHERE
key_id = 'a44a14956d6292ecfe914edbbe1dc226e22478eee145a4db4b9f3188c8f811c5'
AND (
token = 'Hvk73aTH5F1jGGeCI/xryFvYp3BXKpy3EWP3IRqq7SU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)