UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kRKUdLXKsx8z7BDwFRbVSEQs5CuY9Pzm2TwUr2bk4ho=' 
WHERE 
  key_id = '70e0d4ea51788ec3e46e077f0abf6fddb38be307ac25ff2954074a5ff4cd8756' 
  AND (
    token = 'kRKUdLXKsx8z7BDwFRbVSEQs5CuY9Pzm2TwUr2bk4ho=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018