UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/lclgTBrAxtCVw/At2Bo46Lpn4EIsh9UMXnW8wCiR1M='
WHERE
key_id = 'c08d29eb45725c91bfb6226e761fe908709fcc4300c30f168431400beecc376a'
AND (
token = '/lclgTBrAxtCVw/At2Bo46Lpn4EIsh9UMXnW8wCiR1M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)