SELECT 
  id_path 
FROM 
  cscart_categories c 
  JOIN cscart_category_vendor_product_count p USING(category_id) 
WHERE 
  p.company_id = 679

Query time 0.00092

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "23.42"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "p",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "company_id"
          ],
          "key_length": "4",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 16,
          "rows_produced_per_join": 16,
          "filtered": "100.00",
          "using_index": true,
          "cost_info": {
            "read_cost": "1.03",
            "eval_cost": "3.20",
            "prefix_cost": "4.23",
            "data_read_per_join": "256"
          },
          "used_columns": [
            "company_id",
            "category_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "c",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY",
            "p_category_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "category_id"
          ],
          "key_length": "3",
          "ref": [
            "webmarco.p.category_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 16,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "16.00",
            "eval_cost": "3.20",
            "prefix_cost": "23.43",
            "data_read_per_join": "94K"
          },
          "used_columns": [
            "category_id",
            "id_path"
          ]
        }
      }
    ]
  }
}

Result

id_path
266/443/1505
266/443/1518
2910/2920
2910/2916/3017/3028
2910/2916/3308
3648/3573
3648/3751
3648/3751/3816
3648/3913
3648/3685/4486/4559
3648/3550/4922
3648/3642/5299
3648/3616/6456
266/443/447/10411
266/443/10425
266/443/10426