SELECT 
  products.company_id as variant_id, 
  company_descr.i18n_company as variant 
FROM 
  cscart_products as products 
  LEFT JOIN cscart_company_descriptions as company_descr ON company_descr.company_id = products.company_id 
  AND company_descr.lang_code = 'de' 
  LEFT JOIN cscart_companies AS companies ON companies.company_id = products.company_id 
  INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id 
  INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id 
  AND (
    cscart_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_categories.usergroup_ids
    )
  ) 
  AND cscart_categories.status IN ('A', 'H') 
  AND cscart_categories.storefront_id IN (0, 1) 
  LEFT JOIN cscart_master_products_storefront_offers_count AS master_products_storefront_offers_count ON master_products_storefront_offers_count.product_id = products.product_id 
  AND master_products_storefront_offers_count.storefront_id = 1 
WHERE 
  1 = 1 
  AND cscart_categories.category_id IN (43212) 
  AND (
    companies.status IN ('A') 
    OR products.company_id = 0
  ) 
  AND products.company_id IN (1, 39, 0) 
  AND (
    products.usergroup_ids = '' 
    OR FIND_IN_SET(0, products.usergroup_ids) 
    OR FIND_IN_SET(1, products.usergroup_ids)
  ) 
  AND products.status IN ('A') 
  AND products.master_product_status IN ('A') 
  AND products.master_product_id = 0 
  AND (
    products.company_id > 0 
    OR (
      master_products_storefront_offers_count.count > 0
    )
  ) 
  AND products.product_type != 'D' 
GROUP BY 
  products.company_id 
ORDER BY 
  company_descr.i18n_company ASC

Query time 0.00034

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.011987833,
    "filesort": {
      "sort_key": "company_descr.i18n_company",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "master_products_storefront_offers_count",
              "access_type": "system",
              "possible_keys": ["PRIMARY", "idx_storefront_id"],
              "rows": 0,
              "filtered": 0,
              "const_row_not_found": true
            }
          },
          {
            "table": {
              "table_name": "cscart_categories",
              "access_type": "const",
              "possible_keys": ["PRIMARY", "c_status", "p_category_id"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["category_id"],
              "ref": ["const"],
              "rows": 1,
              "filtered": 100
            }
          },
          {
            "table": {
              "table_name": "products_categories",
              "access_type": "ref",
              "possible_keys": ["PRIMARY", "pt"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["category_id"],
              "ref": ["const"],
              "loops": 1,
              "rows": 2,
              "cost": 0.001067082,
              "filtered": 100,
              "using_index": true
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY", "status", "idx_master_product_id"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["product_id"],
              "ref": ["cscart.products_categories.product_id"],
              "loops": 2,
              "rows": 1,
              "cost": 0.003662852,
              "filtered": 99.01960754,
              "attached_condition": "products.master_product_id = 0 and products.company_id in (1,39,0) and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids)) and products.`status` = 'A' and products.master_product_status = 'A' and products.company_id > 0 and products.product_type <> 'D'"
            }
          },
          {
            "table": {
              "table_name": "company_descr",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY"],
              "key": "PRIMARY",
              "key_length": "10",
              "used_key_parts": ["company_id", "lang_code"],
              "ref": ["cscart.products.company_id", "const"],
              "loops": 1.980392157,
              "rows": 1,
              "cost": 0.00362895,
              "filtered": 100,
              "attached_condition": "trigcond(company_descr.lang_code = 'de')"
            }
          },
          {
            "table": {
              "table_name": "companies",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY"],
              "key": "PRIMARY",
              "key_length": "4",
              "used_key_parts": ["company_id"],
              "ref": ["cscart.products.company_id"],
              "loops": 1.980392157,
              "rows": 1,
              "cost": 0.00362895,
              "filtered": 100,
              "attached_condition": "trigcond(companies.`status` = 'A' or products.company_id = 0)"
            }
          }
        ]
      }
    }
  }
}

Result

variant_id variant
1 E-Shop