UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DsiF+z2XUIqy5ksv4nPQlDTfmVmT9EnT1iI3drmlcsY='
WHERE
key_id = '88af0a287f519b527c02926420f6c0905476a3551740f016d4561beae39bf011'
AND (
token = 'DsiF+z2XUIqy5ksv4nPQlDTfmVmT9EnT1iI3drmlcsY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)