UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SlZd/MMuBf5JzrEs2XLSwmR1DPuDhxUvkO1V/ys/JGk='
WHERE
key_id = 'c2408e39bb8a7f5ffce6ee9945d306602bb8bf7924259703304795e3881115a0'
AND (
token = 'SlZd/MMuBf5JzrEs2XLSwmR1DPuDhxUvkO1V/ys/JGk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)