UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pHy9iws+0s9bR7NLHsXD5EL+Bpr/5ittAvVxGxS2okE='
WHERE
key_id = '265cfac1d1b97a0718ee5d58dc62ba937ce569cb70b7084faa516fcb4ffb5c51'
AND (
token = 'pHy9iws+0s9bR7NLHsXD5EL+Bpr/5ittAvVxGxS2okE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)