UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TwFLHr0rYI6/zT/eCOrDpJ+UziwmSBcfzYw7rwfcevo='
WHERE
key_id = '7419cc656060c18cc33959a21418e43dbc2ffcbdeedf4ac597d90fb438c18a24'
AND (
token = 'TwFLHr0rYI6/zT/eCOrDpJ+UziwmSBcfzYw7rwfcevo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)