SELECT 
  COUNT(*) 
FROM 
  cscart_categories 
WHERE 
  category_id = 166 
  AND company_id = 1 
  AND storefront_id IN (0, 1)

Query time 0.00050

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "message": "Impossible WHERE noticed after reading const tables"
    }
  }
}

Result

COUNT(*)
0