SELECT 
  id_path 
FROM 
  cscart_categories 
WHERE 
  category_id IN (
    6, 16, 50, 54, 62, 67, 75, 77, 86, 90, 91, 
    179, 181, 233, 234, 237, 238, 246, 306, 
    309, 311, 337
  )

Query time 0.00039

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": 22,
      "filtered": 100,
      "index_condition": "cscart_categories.category_id in (6,16,50,54,62,67,75,77,86,90,91,179,181,233,234,237,238,246,306,309,311,337)"
    }
  }
}

Result

id_path
6
2/7/16
308/3/13/50
308/3/13/54
308/3/13/62
308/3/13/67
308/3/13/75
308/3/13/77
308/3/13/86
308/3/13/90
308/3/13/91
308/3/13/179
308/3/13/181
308/231/233
308/231/234
308/231/237
308/231/238
308/3/12/246
306
309
275/311
262/337