UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UFxUq6ldwMWfKxBi+ZgRzHTM0U5IqCrp7zN9yFzMHXc='
WHERE
key_id = 'ae44e46fa241dcefae344e6e7cfc33df0a56e710a818ebedad31e36b5ced3d29'
AND (
token = 'UFxUq6ldwMWfKxBi+ZgRzHTM0U5IqCrp7zN9yFzMHXc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)