UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Pm5dpGo1pQGk+FeYv3w6AzEL7S9AVAgu0VsBEweH9OQ='
WHERE
key_id = '9c0da1f46fda804f25cf996b6cc03f1dbfb5330722c5f52b46bcc75c4224ad7a'
AND (
token = 'Pm5dpGo1pQGk+FeYv3w6AzEL7S9AVAgu0VsBEweH9OQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)