UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MMvKX/S2/P5ejeFkp4e+9EH6USC9cj779qK/JlvzvRQ='
WHERE
key_id = 'afdb7fc9feef650ddab32cabaf90304d60681aeb92b9876c62a2bdd7d9e486ef'
AND (
token = 'MMvKX/S2/P5ejeFkp4e+9EH6USC9cj779qK/JlvzvRQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)