SELECT 
  id_path 
FROM 
  cscart_categories 
WHERE 
  category_id IN (
    359, 360, 361, 362, 363, 368, 369, 370, 
    371, 372, 373, 374, 375, 376, 377, 378, 
    379, 380, 381, 382, 383, 384, 385, 386
  )

Query time 0.00078

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "28.02"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "ALL",
      "possible_keys": [
        "PRIMARY",
        "p_category_id"
      ],
      "rows_examined_per_scan": 115,
      "rows_produced_per_join": 23,
      "filtered": "20.87",
      "cost_info": {
        "read_cost": "23.22",
        "eval_cost": "4.80",
        "prefix_cost": "28.02",
        "data_read_per_join": "64K"
      },
      "used_columns": [
        "category_id",
        "id_path"
      ],
      "attached_condition": "(`eshopuga_upgr_4122`.`cscart_categories`.`category_id` in (359,360,361,362,363,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386))"
    }
  }
}

Result

id_path
329/361
329/362
329/363
329/360
329/359
330/378
330/377
330/376
330/375
330/374
330/373
330/372
330/371
330/370
330/369
329/368
331/379
331/380
331/381
331/382
331/383
331/384
331/385
331/386