UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y+lyqZuufH9eHyFw7Yw8oGAF6xWMboBUisOsUWVS20M='
WHERE
key_id = '80d6dcd5c0ac45c16298f5a354f94e1b3e0cf30a653d81c91f87a01d3bbf121d'
AND (
token = 'y+lyqZuufH9eHyFw7Yw8oGAF6xWMboBUisOsUWVS20M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)