UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v51ffZKX8n2ptDCMDLQgI0t+kx7Rl0bsHhcwuG/cCEM='
WHERE
key_id = '72899bf2a1ea19cc6a25b8f76f96b95248140b69c28f87ef1e4d5cc5df74f120'
AND (
token = 'v51ffZKX8n2ptDCMDLQgI0t+kx7Rl0bsHhcwuG/cCEM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)