UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fnh1jEzBL+h11+ZyGRL66nSAA4vuk0U1qNeM55kgsJs='
WHERE
key_id = 'f60dc78192e88373af49df1aefbf5e69c9be5d207efa79ea6a05eb6bd7f9f060'
AND (
token = 'Fnh1jEzBL+h11+ZyGRL66nSAA4vuk0U1qNeM55kgsJs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)