SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    5596, 5678, 5603, 5651, 5877, 5784, 5797, 
    5963, 5983, 6077, 6148, 6190, 6211, 
    6274, 6347, 6401, 6413, 6507, 5848, 
    5666, 5673, 5713, 5767, 5887, 5806, 
    6031, 6000, 6096, 6163, 6242, 6226, 
    6360, 6466, 6516, 6444, 5721, 5858, 
    5897, 5835, 5950, 6036, 6011, 6256, 
    6372, 6478, 6529, 6457, 5905, 5728, 
    5868, 6109, 6132, 6287, 6491, 5738, 
    5918, 6178, 6300, 6539, 5930, 6322, 
    6337, 6553, 5941, 6391, 6572, 6588, 
    6610, 6626, 6647
  )

Query time 0.00077

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "45.89"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 112,
      "rows_produced_per_join": 112,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "23.49",
        "eval_cost": "22.40",
        "prefix_cost": "45.89",
        "data_read_per_join": "664K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (5596,5678,5603,5651,5877,5784,5797,5963,5983,6077,6148,6190,6211,6274,6347,6401,6413,6507,5848,5666,5673,5713,5767,5887,5806,6031,6000,6096,6163,6242,6226,6360,6466,6516,6444,5721,5858,5897,5835,5950,6036,6011,6256,6372,6478,6529,6457,5905,5728,5868,6109,6132,6287,6491,5738,5918,6178,6300,6539,5930,6322,6337,6553,5941,6391,6572,6588,6610,6626,6647))"
    }
  }
}

Result

category_id parent_id
5603 5596
5666 5596
5673 5596
5721 5596
5728 5596
5738 5596
5651 5603
5678 5673
5713 5673
5784 5767
5848 5767
5858 5767
5868 5767
5918 5767
5930 5767
5941 5767
5797 5784
5806 5784
5835 5784
5877 5868
5887 5868
5897 5868
5905 5868
5963 5950
6031 5950
6036 5950
6109 5950
5983 5963
6000 5963
6011 5963
6077 6036
6096 6036
6148 6132
6163 6132
6190 6178
6242 6178
6256 6178
6287 6178
6300 6178
6322 6178
6211 6190
6226 6190
6274 6256
6347 6337
6360 6337
6372 6337
6401 6391
6466 6391
6478 6391
6491 6391
6539 6391
6553 6391
6572 6391
6413 6401
6444 6401
6457 6401
6507 6491
6516 6491
6529 6491