SELECT 
  id_path 
FROM 
  cscart_categories 
WHERE 
  category_id IN (
    104, 110, 190, 210, 211, 319, 320, 412
  )

Query time 0.00152

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_categories",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "p_category_id"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["category_id"],
          "rows": 8,
          "filtered": 100,
          "index_condition": "cscart_categories.category_id in (104,110,190,210,211,319,320,412)"
        }
      }
    ]
  }
}

Result

id_path
104
110
104/190
110/210
110/211
104/319
104/320
412