SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    11431, 11441, 11654, 2027, 2023, 2038, 
    11655, 11437, 2035, 2024, 2039, 11435, 
    2033, 11436, 11440, 11430, 2022, 2037, 
    2036, 11656, 2021, 2034, 3514, 2025, 
    11439, 11442, 11438, 2026, 11433, 11657, 
    11432
  )

Query time 0.00086

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "13.26"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 63,
      "rows_produced_per_join": 63,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "6.96",
        "eval_cost": "6.30",
        "prefix_cost": "13.26",
        "data_read_per_join": "164K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (11431,11441,11654,2027,2023,2038,11655,11437,2035,2024,2039,11435,2033,11436,11440,11430,2022,2037,2036,11656,2021,2034,3514,2025,11439,11442,11438,2026,11433,11657,11432))"
    }
  }
}

Result

category_id parent_id
2033 2021
2034 2021
2035 2021
2036 2021
2038 2021
2039 2021
3514 2021
11431 2021
11432 2021
11433 2021
11435 2021
11436 2021
11437 2021
11438 2021
11439 2021
11440 2021
11441 2021
11442 2021
11654 2021
11655 2021
11656 2021
11657 2021
2023 2022
2024 2022
2025 2022
2026 2022
2027 2022
2028 2022
2029 2022
2030 2022
2031 2022
2032 2022
2037 2022
11430 2022