UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bDy70SGs8+VzE7/bDlP5eJDcXTR/ex2A3/SPg9pyWCs='
WHERE
key_id = '826e578678894436e90be683f783b0b4866657a7c23ed14bfe55477ae1cf206c'
AND (
token = 'bDy70SGs8+VzE7/bDlP5eJDcXTR/ex2A3/SPg9pyWCs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)