SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    21415, 528, 1416, 15493, 747, 529, 531, 
    525, 1417, 532, 748, 527, 530, 551, 533, 
    1420, 749, 1421, 1412, 1411, 13821, 
    21453, 3637
  )

Query time 0.00068

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "9.65"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 45,
      "rows_produced_per_join": 45,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "5.16",
        "eval_cost": "4.50",
        "prefix_cost": "9.66",
        "data_read_per_join": "117K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (21415,528,1416,15493,747,529,531,525,1417,532,748,527,530,551,533,1420,749,1421,1412,1411,13821,21453,3637))"
    }
  }
}

Result

category_id parent_id
528 525
529 525
530 525
531 525
532 525
533 525
1420 525
1421 525
13821 525
15493 525
21453 525
534 527
535 527
1409 749
1410 749
1411 749
1412 749
1413 749
1414 749
1415 749
1416 749
1417 749
1418 749
1419 749
3637 749