SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    20165, 20166, 20167, 20168, 20169, 20170, 
    20171, 20172, 20173, 20174, 20175, 
    20176, 20177, 20178, 20179, 20180, 
    20181, 20182, 20183, 20184, 20185
  ) 
  AND category_id != 1

Query time 0.00006

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_categories",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "parent", "p_category_id"],
          "key": "parent",
          "key_length": "3",
          "used_key_parts": ["parent_id"],
          "rows": 21,
          "filtered": 100,
          "index_condition": "cscart_categories.parent_id in (20165,20166,20167,20168,20169,20170,20171,20172,20173,20174,20175,20176,20177,20178,20179,20180,20181,20182,20183,20184,20185)",
          "attached_condition": "cscart_categories.category_id <> 1"
        }
      }
    ]
  }
}