SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    15805, 15580, 15634, 15581, 15633, 16218, 
    15636, 16033, 15616, 15579, 15635, 
    15593, 15586, 15589, 15587, 16111, 
    15592, 15582, 15585, 15588, 15590, 
    15578, 15584, 15591, 15594
  )

Query time 0.00083

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "9.25"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 43,
      "rows_produced_per_join": 43,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "4.95",
        "eval_cost": "4.30",
        "prefix_cost": "9.25",
        "data_read_per_join": "112K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (15805,15580,15634,15581,15633,16218,15636,16033,15616,15579,15635,15593,15586,15589,15587,16111,15592,15582,15585,15588,15590,15578,15584,15591,15594))"
    }
  }
}

Result

category_id parent_id
15579 15578
15580 15578
15581 15578
15616 15578
15633 15578
15634 15578
15635 15578
15636 15578
15805 15578
16218 15578
15584 15582
15585 15582
15586 15582
15587 15582
15591 15582
15592 15582
15593 15582
15594 15582
15589 15588
15590 15588
16111 15588
16033 15590