SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    7846, 7852, 7907, 7961, 8042, 8107, 8310, 
    8319, 8164, 8189, 8271, 7915, 7885, 
    7969, 8055, 7900, 8128, 8314, 8327, 
    8166, 8202, 8284, 7892, 7952, 7988, 
    8073, 8103, 8133, 8332, 8343, 8173, 
    8208, 8291, 7995, 8086, 8142, 8348, 
    8158, 8211, 8180, 8009, 8148, 8224, 
    8014, 8186, 8251, 8022, 8259, 8265, 
    8096, 8303
  )

Query time 0.00063

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "34.67"
    },
    "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": 84,
      "rows_produced_per_join": 84,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "17.87",
        "eval_cost": "16.80",
        "prefix_cost": "34.67",
        "data_read_per_join": "498K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (7846,7852,7907,7961,8042,8107,8310,8319,8164,8189,8271,7915,7885,7969,8055,7900,8128,8314,8327,8166,8202,8284,7892,7952,7988,8073,8103,8133,8332,8343,8173,8208,8291,7995,8086,8142,8348,8158,8211,8180,8009,8148,8224,8014,8186,8251,8022,8259,8265,8096,8303))"
    }
  }
}

Result

category_id parent_id
7852 7846
7885 7846
7892 7846
7907 7900
7915 7900
7952 7900
7995 7900
8009 7900
8014 7900
8022 7900
8096 7900
7961 7952
7969 7952
7988 7952
8042 8022
8055 8022
8073 8022
8086 8022
8107 8103
8128 8103
8133 8103
8142 8103
8148 8103
8164 8158
8166 8158
8173 8158
8189 8186
8202 8186
8208 8186
8211 8186
8224 8186
8251 8186
8259 8186
8271 8265
8284 8265
8291 8265
8310 8303
8314 8303
8343 8303
8348 8303
8319 8314
8327 8314
8332 8314