UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+7qVNul5Etn/xY4xVv7Oj6PUdDUzKXn6dr7ksz1gqfk='
WHERE
key_id = '73843fd3cf73cef79ff736517272fae8b4a8afa47e8be3de0ceb1a1ae2f281a8'
AND (
token = '+7qVNul5Etn/xY4xVv7Oj6PUdDUzKXn6dr7ksz1gqfk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)