UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2ST/vIhu9Lezm1pf5aba1aRJa8pq3o3MC6Jxt39GVog=' 
WHERE 
  key_id = '6d9aeda1c3c9ac71546d4f18cc8b98fd9beeac9c295f3a400988cf01f6fcc18a' 
  AND (
    token = '2ST/vIhu9Lezm1pf5aba1aRJa8pq3o3MC6Jxt39GVog=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036