SELECT 
  id_path 
FROM 
  cscart_categories 
WHERE 
  category_id IN (
    23, 41, 42, 50, 54, 61, 64, 67, 74, 81, 83, 
    120, 179, 192, 201, 217, 222, 228, 241, 
    246, 265, 269, 295, 304, 306, 313, 330, 
    337
  )

Query time 0.00068

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_categories",
      "access_type": "ALL",
      "possible_keys": ["PRIMARY"],
      "rows": 240,
      "filtered": 11.667,
      "attached_condition": "cscart_categories.category_id in (23,41,42,50,54,61,64,67,74,81,83,120,179,192,201,217,222,228,241,246,265,269,295,304,306,313,330,337)"
    }
  }
}

Result

id_path
308/3/14/201
308/3/12/246
308/3/12/41
217
308/232/241
308/3/12/42
228
308/3/13/50
308/3/12/222
23
308/3/13/54
308/3/13/192
308/3/13/61
308/3/13/64
308/3/13/120
308/3/13/67
308/3/13/74
308/3/13/81
308/3/13/83
308/3/13/179
262/265
308/231/269
308/3/13/295
2/8/304
306
308/3/12/313
308/3/14/330
262/337