UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fLXYuLR3+PDRXJJTyFK+vIsgdrGeVHOqIJfmIKEOKHs='
WHERE
key_id = '02906cb062f0e26bd4ea15ca5ce0db9f326bb97df54e5a6c527adaaeab5e20d9'
AND (
token = 'fLXYuLR3+PDRXJJTyFK+vIsgdrGeVHOqIJfmIKEOKHs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)