SELECT 
  id_path 
FROM 
  cscart_categories 
WHERE 
  category_id IN (
    1, 10, 15, 17, 23, 29, 41, 42, 49, 56, 67, 
    70, 71, 79, 82, 88, 91, 94, 95, 101, 104, 
    181, 194, 208, 217, 222, 233, 234, 242, 
    258, 261, 270, 271, 304, 306, 307, 336
  )

Query time 0.00063

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_categories",
      "access_type": "ALL",
      "possible_keys": ["PRIMARY"],
      "rows": 240,
      "filtered": 15.417,
      "attached_condition": "cscart_categories.category_id in (1,10,15,17,23,29,41,42,49,56,67,70,71,79,82,88,91,94,95,101,104,181,194,208,217,222,233,234,242,258,261,270,271,304,306,307,336)"
    }
  }
}

Result

id_path
308/3/14/94
308/3/14/95
308/3/14/101
308/3/14/104
1
308/231/233
308/3/12/194
2/7/17
2/10
308/231/234
2/10/29
308/3/12/41
2/7/15
217
308/3/13/49
308/3/12/42
308/232/242
308/3/12/222
23
308/3/12/208
308/3/13/56
308/3/13/181
308/3/13/67
308/3/13/70
308/3/13/71
308/3/13/79
308/3/13/82
308/3/13/88
308/3/13/91
275/258
308/3/12/261
308/3/12/270
308/3/12/271
2/8/304
306
307
262/336