UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HzuV5dboX/WZS90/WcDveTyj8LxZybA2hH3HF/QI3OM='
WHERE
key_id = '58f657945dc6f9821e1e964b14d4e08796a69c6542a15ebbc88c264f714f5c5e'
AND (
token = 'HzuV5dboX/WZS90/WcDveTyj8LxZybA2hH3HF/QI3OM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)