SELECT 
  category_id, 
  parent_id 
FROM 
  jmj_categories 
WHERE 
  parent_id IN(36, 2, 41, 40) 
  AND category_id != 1

Query time 0.01054

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "30.61"
    },
    "table": {
      "table_name": "jmj_categories",
      "access_type": "range",
      "possible_keys": [
        "PRIMARY",
        "parent",
        "p_category_id"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 19,
      "rows_produced_per_join": 19,
      "filtered": "100.00",
      "index_condition": "(`jmj_test`.`jmj_categories`.`parent_id` in (36,2,41,40))",
      "cost_info": {
        "read_cost": "26.81",
        "eval_cost": "3.80",
        "prefix_cost": "30.61",
        "data_read_per_join": "73K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`jmj_test`.`jmj_categories`.`category_id` <> 1)"
    }
  }
}

Result

category_id parent_id
36 2
45 2
46 2
87 2
31 36
32 36
33 36
34 36
35 36
37 36
38 36
39 36
41 36
40 36
43 36
42 36
44 36