SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    291, 311, 301, 286, 280, 320, 295, 54, 
    296, 281, 308, 321, 292, 302, 287, 57, 
    288, 297, 282, 322, 303, 293, 313, 309, 
    310, 298, 323, 294, 289, 304, 58, 299, 
    55, 53, 305, 324, 56, 300, 306, 316, 59, 
    317, 318, 77, 128, 319
  )

Query time 0.00082

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "23.29"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 113,
      "rows_produced_per_join": 113,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "11.99",
        "eval_cost": "11.30",
        "prefix_cost": "23.29",
        "data_read_per_join": "295K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (291,311,301,286,280,320,295,54,296,281,308,321,292,302,287,57,288,297,282,322,303,293,313,309,310,298,323,294,289,304,58,299,55,53,305,324,56,300,306,316,59,317,318,77,128,319))"
    }
  }
}

Result

category_id parent_id
280 53
281 53
282 53
283 53
284 53
285 53
22787 53
22788 53
295 54
296 54
297 54
298 54
299 54
300 54
301 55
302 55
303 55
304 55
305 55
306 55
307 56
308 56
309 56
310 56
286 57
287 57
288 57
289 57
290 57
291 58
292 58
293 58
294 58
325 58
22821 58
311 59
312 59
313 59
314 59
315 59
316 59
317 59
318 59
22793 301
22794 301
22795 301
22796 301
22797 301
22798 302
22799 302
22800 302
22801 302
22809 303
22810 303
22811 303
22812 303
22813 303
22802 304
22803 304
22804 304
22805 304
22806 304
22807 304
22808 304
22789 305
22790 305
22791 305
22792 305
128 319
320 319
321 319
322 319
323 319
324 319
22814 319
22815 320
22816 320
22817 320
22818 320
22819 320
22820 320