UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lqpU8oPrbGdaEKN6i2SPDcgq7LcWg3gBhA3KbzyMtzk='
WHERE
key_id = '0abdd4da3ae6f27eb2f96e4953a4c626d55c5e0a54e9da2505d8a71857e325b6'
AND (
token = 'lqpU8oPrbGdaEKN6i2SPDcgq7LcWg3gBhA3KbzyMtzk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)