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.02608

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "p",
          "access_type": "ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "4",
          "used_key_parts": ["company_id"],
          "ref": ["const"],
          "rows": 63,
          "filtered": 100,
          "using_index": true
        }
      },
      {
        "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": ["cscart.p.category_id"],
          "rows": 1,
          "filtered": 100
        }
      }
    ]
  }
}

Result

id_path
167/165
167/168
167/169
167/170
167/171
167/172
166/175/176
166/177/178
166/177/179
166/177/180
166/177/181
166/177/182
166/175/185
166/175/186
166/175/187
166/175/188
166/175/189
166/174/190
166/174/191
166/174/193
166/174/194
166/174/195
166/196/197
166/196/198
166/196/199
166/196/200
167/201
166/175/202
203/204/208
203/204/209
203/204/210
203/211/212
203/211/213
203/211/214
203/215/216
203/215/217
203/215/218
219/220
219/221
219/222
223/224
223/225
223/226
223/227
264/228/229
264/228/230
264/228/231
264/228/232
166/234/235
166/234/236
166/234/237
166/234/238
166/234/240
264/241/243
264/241/244
264/245/246
264/245/247
264/245/248
264/245/249
250/251
250/252
250/253
166/254/263/255