SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    7857, 7858, 7859, 7860, 7861, 7862, 7863, 
    7864, 7865, 7866, 7867, 7868, 7869, 
    7870, 7871, 7872, 7873, 7874, 7875, 
    7876, 7877, 7878, 7879, 7880, 7881, 
    7882, 7883, 8104
  )

Query time 0.00314

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "20.24"
    },
    "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": 48,
      "rows_produced_per_join": 48,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "10.64",
        "eval_cost": "9.60",
        "prefix_cost": "20.24",
        "data_read_per_join": "284K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,8104))"
    }
  }
}

Result

category_id parent_id
7895 7857
7946 7858
7947 7858
7959 7859
7976 7860
7977 7860
7978 7860
7979 7860
7980 7860
7981 7860
7990 7863
7997 7864
7998 7864
7999 7864
8015 7868
8031 7869
8032 7869
8033 7869
8034 7869
8049 7871
8050 7871
8051 7871
8064 7874
8065 7874
8072 7875
8090 7876
8091 7876
8092 7876
8093 7876
8094 7876
8146 7877
8147 7877
8156 7878
8157 7878
8163 7881
8132 8104