SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    2431, 2428, 2429, 2439, 2449, 2433, 2445, 
    2434, 2432, 2440, 2446, 2438, 2633, 
    2430, 3382, 2535, 3376, 2618, 2450, 
    2441, 4894, 2533, 2444, 2426, 2448, 
    2443, 3339, 2447, 2452, 2442, 5235, 
    2427, 2695
  )

Query time 0.00085

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "9.49"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 44,
      "rows_produced_per_join": 44,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "5.09",
        "eval_cost": "4.40",
        "prefix_cost": "9.49",
        "data_read_per_join": "115K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (2431,2428,2429,2439,2449,2433,2445,2434,2432,2440,2446,2438,2633,2430,3382,2535,3376,2618,2450,2441,4894,2533,2444,2426,2448,2443,3339,2447,2452,2442,5235,2427,2695))"
    }
  }
}

Result

category_id parent_id
2433 2426
2434 2426
2438 2426
2445 2426
2446 2426
2428 2427
2429 2427
2430 2427
2431 2427
2432 2427
2449 2427
2633 2427
2439 2428
2440 2428