SELECT 
  id_path 
FROM 
  cscart_categories 
WHERE 
  category_id IN (
    6, 44, 60, 67, 197, 217, 234, 236, 242, 
    304, 306, 336
  )

Query time 0.00035

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_categories",
      "access_type": "range",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["category_id"],
      "rows": 12,
      "filtered": 100,
      "index_condition": "cscart_categories.category_id in (6,44,60,67,197,217,234,236,242,304,306,336)"
    }
  }
}

Result

id_path
6
308/3/12/44
308/3/13/60
308/3/13/67
2/11/197
217
308/231/234
308/231/236
308/232/242
2/8/304
306
262/336