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

Query time 0.00033

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.09262885,
    "nested_loop": [
      {
        "table": {
          "table_name": "p",
          "access_type": "ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "4",
          "used_key_parts": ["company_id"],
          "ref": ["const"],
          "loops": 1,
          "rows": 83,
          "cost": 0.01757113,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "c",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY", "p_category_id"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["category_id"],
          "ref": ["u985510652_ecartify.p.category_id"],
          "loops": 83,
          "rows": 1,
          "cost": 0.07505772,
          "filtered": 100
        }
      }
    ]
  }
}

Result

id_path
167/165
166
167/168
167/169
167/170
167/171
167/172
166/177/178
166/177/179
166/177/181
166/177/182
166/174/193
166/196
166/196/197
166/196/198
166/196/199
166/196/200
167/201
203/204/208
203/204/209
203/204/210
203/211/212
203/211/213
203/211/214
203/215/217
203/215/218
219/220
219/221
219/222
223
223/224
223/225
223/227
228/229
228/230
228/231
228/232
241/242
241/243
241/244
269
269/270
269/270/271
287
287/288
287/288/289
287/304
287/304/305
287/288/289/450
454
454/455
454/455/456
454/455/456/457
454/455/456/458
454/455/456/459
460
460/461
460/475
166/478
166/479
481
219/498
203/500
501
527
528
529
530
535/536/537