UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FFmlCENyf1cBahy3nKjf8IP2XW0VwxRd/mGRJ8kxy9I=' 
WHERE 
  key_id = '57f75f801308397f65a24b226eff83cbb409e50e2461aefbfc6cebd9a46f0fd5' 
  AND (
    token = 'FFmlCENyf1cBahy3nKjf8IP2XW0VwxRd/mGRJ8kxy9I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025