UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cfxqsccx1/gv9ptzMWEEoXagmWd2+r94luiUWhdEWf4='
WHERE
key_id = 'b93dfe0a1986cc318cf8730efb2fbb4dac75f0425adb0e2fed1c2f4fa498a2bb'
AND (
token = 'cfxqsccx1/gv9ptzMWEEoXagmWd2+r94luiUWhdEWf4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)