SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    276, 6729, 6730, 6731, 74, 127, 73, 72, 
    75, 88, 90, 91, 6654, 6743, 126, 182, 
    6727, 8954
  )

Query time 0.00070

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "8.85"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 41,
      "rows_produced_per_join": 41,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "4.75",
        "eval_cost": "4.10",
        "prefix_cost": "8.85",
        "data_read_per_join": "107K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (276,6729,6730,6731,74,127,73,72,75,88,90,91,6654,6743,126,182,6727,8954))"
    }
  }
}

Result

category_id parent_id
22822 90
22823 90
22824 90
90 91
276 91
6654 91
6743 91
8393 91
8394 91
22825 91
22826 91
22827 91
22828 91
6728 6727
6729 6727
6730 6727
6731 6727
6732 6727
6733 6727
6734 6727
6735 6727
6736 6727
15769 8954
15770 8954
15771 8954
15772 8954
15773 8954