UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lVfCH6mGxj0nH5QfFn/KoieCMf5YXh5jxAks043pdtU='
WHERE
key_id = '91e1b4d648c2c2bccd7298d0a543221c7c4424aa9811ad76fb9e47d59106f578'
AND (
token = 'lVfCH6mGxj0nH5QfFn/KoieCMf5YXh5jxAks043pdtU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)