UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zmJYnVJGYT6qol3sxlaunB42WKW41s/3ubWcmGuKH/0='
WHERE
key_id = 'af9d2a96811b984a2cb7b621fc7c63b1437569387435418980778ee5f2d8b9d5'
AND (
token = 'zmJYnVJGYT6qol3sxlaunB42WKW41s/3ubWcmGuKH/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)