UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eyL8DCU2o3qpOhrjxOlkqfHTDl16uX8kojJS9kdB1+4='
WHERE
key_id = '2f043fa2aac7ef28b1c94b3e4c0902380bada431cd127c58f53e8963ddac419f'
AND (
token = 'eyL8DCU2o3qpOhrjxOlkqfHTDl16uX8kojJS9kdB1+4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)