UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'h0yCspyNh9dpSscQW/5RA5+0JzJfKw6qDNu66DqKSfA='
WHERE
key_id = '917cc904eef8911f101e2eebf0365d8aaea3a90a60e99b1fc80f242fdee2c5ff'
AND (
token = 'h0yCspyNh9dpSscQW/5RA5+0JzJfKw6qDNu66DqKSfA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)