UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CkIBSR6nIUDOgbkN0GYzHyCeD6uHfVf+aO+GvMQmcho='
WHERE
key_id = '1e67be32773b8370d8853e3825f266dcc6cea6f3b1c73c1e68a4944a1d61336a'
AND (
token = 'CkIBSR6nIUDOgbkN0GYzHyCeD6uHfVf+aO+GvMQmcho='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)