SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  descr1.product as product, 
  companies.company as company_name, 
  products.product_type, 
  products.parent_product_id, 
  products.variation_sku, 
  companies.discreet_shipping as company_discreet_shipping 
FROM 
  cscart_products as products 
  LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id 
  AND descr1.lang_code = 'en' 
  LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id 
  AND prices.lower_limit = 1 
  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_product_popularity as popularity ON popularity.product_id = products.product_id 
WHERE 
  1 
  AND companies.status IN ('A') 
  AND products.company_id = 170 
  AND products.amount > 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 prices.usergroup_id IN (0, 0, 1) 
  AND products.company_id = 170 
  AND products.parent_product_id = 0 
GROUP BY 
  products.product_id 
ORDER BY 
  popularity.total desc, 
  products.product_id ASC

Query time 0.05969

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "3092.60"
    },
    "ordering_operation": {
      "using_filesort": true,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "table": {
              "table_name": "companies",
              "access_type": "const",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "company_id"
              ],
              "key_length": "4",
              "ref": [
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 1,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.10",
                "prefix_cost": "0.00",
                "data_read_per_join": "15K"
              },
              "used_columns": [
                "company_id",
                "status",
                "company",
                "discreet_shipping"
              ]
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "status",
                "idx_parent_product_id"
              ],
              "key": "idx_parent_product_id",
              "used_key_parts": [
                "parent_product_id"
              ],
              "key_length": "4",
              "ref": [
                "const"
              ],
              "rows_examined_per_scan": 15524,
              "rows_produced_per_join": 305,
              "filtered": "1.97",
              "cost_info": {
                "read_cost": "884.27",
                "eval_cost": "30.53",
                "prefix_cost": "2436.68",
                "data_read_per_join": "1M"
              },
              "used_columns": [
                "product_id",
                "product_type",
                "status",
                "company_id",
                "amount",
                "usergroup_ids",
                "parent_product_id",
                "variation_sku"
              ],
              "attached_condition": "((`cscartdb`.`products`.`company_id` = 170) and (`cscartdb`.`products`.`amount` > 0) and ((`cscartdb`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscartdb`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscartdb`.`products`.`usergroup_ids`))) and (`cscartdb`.`products`.`status` = 'A'))"
            }
          },
          {
            "table": {
              "table_name": "prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "product_id",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "cscartdb.products.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 305,
              "filtered": "99.99",
              "cost_info": {
                "read_cost": "76.33",
                "eval_cost": "30.53",
                "prefix_cost": "2543.53",
                "data_read_per_join": "7K"
              },
              "used_columns": [
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "attached_condition": "((`cscartdb`.`prices`.`lower_limit` = 1) and (`cscartdb`.`prices`.`usergroup_id` in (0,0,1)))"
            }
          },
          {
            "table": {
              "table_name": "popularity",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "total"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "cscartdb.products.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 305,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "76.32",
                "eval_cost": "30.53",
                "prefix_cost": "2650.38",
                "data_read_per_join": "9K"
              },
              "used_columns": [
                "product_id",
                "total"
              ]
            }
          },
          {
            "table": {
              "table_name": "products_categories",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "pt"
              ],
              "key": "pt",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "cscartdb.products.product_id"
              ],
              "rows_examined_per_scan": 2,
              "rows_produced_per_join": 610,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "152.64",
                "eval_cost": "61.06",
                "prefix_cost": "2864.08",
                "data_read_per_join": "9K"
              },
              "used_columns": [
                "product_id",
                "category_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "cscart_categories",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "c_status",
                "p_category_id"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "ref": [
                "cscartdb.products_categories.category_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 30,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "152.64",
                "eval_cost": "3.05",
                "prefix_cost": "3077.77",
                "data_read_per_join": "102K"
              },
              "used_columns": [
                "category_id",
                "storefront_id",
                "usergroup_ids",
                "status"
              ],
              "attached_condition": "(((`cscartdb`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscartdb`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscartdb`.`cscart_categories`.`usergroup_ids`))) and (`cscartdb`.`cscart_categories`.`status` in ('A','H')) and (`cscartdb`.`cscart_categories`.`storefront_id` in (0,1)))"
            }
          },
          {
            "table": {
              "table_name": "descr1",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "product_id"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id",
                "lang_code"
              ],
              "key_length": "9",
              "ref": [
                "cscartdb.products.product_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 30,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "11.78",
                "eval_cost": "3.05",
                "prefix_cost": "3092.60",
                "data_read_per_join": "116K"
              },
              "used_columns": [
                "product_id",
                "lang_code",
                "product"
              ]
            }
          }
        ]
      }
    }
  }
}

Result

product_id product company_name product_type parent_product_id variation_sku company_discreet_shipping
16666 Uncensored Lingerie Set, Bralette And Panties Set, Sheer Bra, Transparent Lingerie, Nude Lingerie, Mesh Panties, See Through Lingerie Zhgun Lingerie P 0 Y
16941 Black Sheer Lingerie Set, Garter Belt, See Through Lingerie, Uncensored Zhgun Lingerie P 0 Y
16927 Open Lingerie Set, Open Crotch Lingerie, Open Cup Bra, Crotchless Panties, Uncensored Lingerie Set Zhgun Lingerie P 0 Y
16665 Open cup Bra, Cupless Bra, Open Lingerie, Uncensored Lingerie, ZhgunMadeStore Zhgun Lingerie P 0 Y
16930 Crotchless Lingerie Set,Open Bra,Uncensored Lace Lingerie,Lace Thong Panties,Wedding Lingerie,Bridal lingerie Zhgun Lingerie P 0 Y
16799 White lingerie set, Half-Open Cup Bra and Thong Panties Set with Adjustable Bands Zhgun Lingerie P 0 Y
16685 Open Crotch Open Cup Lingerie, Black white lace underwear, Strappy Harness set, Uncensored Lingerie Zhgun Lingerie P 0 Y
16660 Open quarter cup bra for large bust, Open cupless bra, Shelf Bra Open plus size, 1/4 cup bra with support, Half cup bra Zhgun Lingerie P 0 Y
16928 White black Cosplay Lingerie Set, Open Crotch underwear, Open Cup Bra, Uncensored Lingerie Set, Kinky Lingerie Zhgun Lingerie P 0 Y
16709 Red Harness Lingerie Set, Half-Open Cup Bra Set with Adjustable Straps and High Thong Panties Zhgun Lingerie P 0 Y
16798 Lace Lingerie Set, Open quarter cup bra for large bust, Open cupless bra, Shelf Bra Open plus size, 1/4 cup bra with support, Half cup bra Zhgun Lingerie P 0 Y
16929 White Sheer Lingerie Set, See Through Panties, High Waist Panties, Mesh Lingerie Set, Sheer Bralette Top Zhgun Lingerie P 0 Y
16745 Crotchless panties Open Cup Bra Lingerie Set, Sheer Open Crotch Panties with Garter Belt, Uncensored Lingerie Zhgun Lingerie P 0 Y
16694 Red soft elastic mesh underwear, panties with adjustable straps, quarter cup bra Zhgun Lingerie P 0 Y
16931 Crotchless Panties And Open Cup Bra, Uncensored Lingerie Set, Gothic Lingerie Set Zhgun Lingerie P 0 Y
16961 Black Open crotched lingerie sets, open cup bra, adjustable thong panty, garter belt, See Thru Underwear Zhgun Lingerie P 0 Y
16712 Bra and panty set,Lingerie see through,See thru underwear, Set of bra, panties, belt-corset Zhgun Lingerie P 0 Y
16655 Transparent lingerie set, Sheer bra,Bra and panty set,Lingerie see through,See thru underwear, Set of bra, panties, belt-corset Zhgun Lingerie P 0 Y
16729 Red Sheer nightgown, lingerie see through night dress, lingerie set with panties Zhgun Lingerie P 0 Y
16768 See Through Bodysuit made of soft mesh, black lingerie set, crotchless lingerie Zhgun Lingerie P 0 Y
16845 Bodysuit women for under costumes with body harness Zhgun Lingerie P 0 Y
16743 Sheer bodysuit women, See Through Lingerie, Open cup and open crotch Zhgun Lingerie P 0 Y
16967 Crotchless lingerie, Black lace Lingerie Sets See Through, Open Cup Bra Crotchless Panties, Strappy underwear Zhgun Lingerie P 0 Y
16663 Shelf bra open - Cupless bra with support for custom sizes Available different colors Zhgun Lingerie P 0 Y
16719 Sheer Mesh Nightgown, wedding bridal Nightdress, Open cup bra nightwear Zhgun Lingerie P 0 Y
16805 Open Lingerie For Women, Crotchless Lingerie Set, Open Bra, Crotchless Panties, Strap Lingerie, BDSM Lingerie Set, Harness Lingerie,Succubus Zhgun Lingerie P 0 Y
16746 Black See Through Lingerie set, Sheer Lingerie, Uncensored Lingerie Zhgun Lingerie P 0 Y
16702 Black bra and panty set, Strap Lingerie Set, Body harness, handmade lingerie, black lingerie with green straps Zhgun Lingerie P 0 Y
16657 Soft transparent bodysuit made of elastic mesh, Sheer babydoll see through bodysuit lingerie Zhgun Lingerie P 0 Y
16682 Sheer bra,Transparent lingerie,Bra and panty set,Mesh panty,Lingerie see through,See thru underwear,See through bras,Leg garters,Lace bra Zhgun Lingerie P 0 Y
16784 SET OF THREE Open crotch lingerie, See through panties, Crotchless panties Open panty Zhgun Lingerie P 0 Y
16710 Open Cup Cupless Bra Zhgun Lingerie P 0 Y
16779 Transparent lingerie with chains,Bra and panty set,Mesh panty, Sheer bra,See thru underwear Zhgun Lingerie P 0 Y
16684 Lingerie Set, Cupless Bra, Open Cup Bra with panties, See Through Lingerie, Wedding Lingerie Zhgun Lingerie P 0 Y
16718 Transparent lingerie set, Sheer bra,Bra and panty set,Mesh panty,Lingerie see through,See thru underwear, More colors Zhgun Lingerie P 0 Y
16711 Black Open crotched lingerie sets, sheer mesh underwear women, open cup bra with adjustable crotchless thong panty Zhgun Lingerie P 0 Y
16948 White crotchless lingerie set, Mesh panties Open Bra, Garter Belt, Sheer Thong Panties, Cupless Bra, Cosplay Lingerie, Gift Zhgun Lingerie P 0 Y
16739 Open Crotch Lingerie Set, Open cup bra and panties set, Underwear woman Zhgun Lingerie P 0 Y
16744 Red Lingerie Set, Open Cup Bra and Open Crotch Panties Set, Garter Belt, Harness Lingerie Set, Transparent underwear Zhgun Lingerie P 0 Y
16683 Sheer lingerie, Sheer bra, See through lingerie, bra and panty set, Mesh lingerie, See through panties Zhgun Lingerie P 0 Y
16722 black see through bra top, lingerie, underwear women Zhgun Lingerie P 0 Y
16952 Black Open Cup Bra Corset with Open Crotched High Waist Panty, Crotchless Lingerie Sets Classy Zhgun Lingerie P 0 Y
16720 Panties with removable garters and belt-corset, See through sheer panties Zhgun Lingerie P 0 Y
16672 Open cup bra with support, Available different colors Zhgun Lingerie P 0 Y
16781 Wedding Bridal bra and panty lingerie set, Sheer bra,Transparent lingerie,Mesh panty,Lingerie see through,See thru underwear Zhgun Lingerie P 0 Y
16675 Black mesh bra and panty set, Open Lingerie Set - Open Cup Bra - Panties with Garter Belt, Handmade underwear Zhgun Lingerie P 0 Y
16724 Transparent lingerie set, Sheer bra,Bra and panty set,Lingerie see through,See thru underwear, Set of bra, panties, belt-corset Zhgun Lingerie P 0 Y
16740 Crotchless Red Lingerie Sets Open cup bra for large bust, Uncensored Set Of Bra, Panties And Garter Belt, Open Cup, Harness Underwear Zhgun Lingerie P 0 Y
16697 Leopard Lingerie Set, Quarter Cup Bra Thong Panty, Sheer Underwear Women Zhgun Lingerie P 0 Y
16662 Bodysuit women Zhgun Lingerie P 0 Y
16753 CUSTOMIZED ORDER! bodysuit women for under costumes, lingerie set Zhgun Lingerie P 0 Y
16707 SET: Bra, panties, garter belt, Transparent lingerie set, Sheer bra,Bra and panty set,Lingerie see through Zhgun Lingerie P 0 Y
16748 Classic thong panties with garter belt and stockings, many colors Zhgun Lingerie P 0 Y
16723 Shelf bra with support, Available different colors Zhgun Lingerie P 0 Y
16755 Lingerie set made of black lace and red soft mesh,bra panty garter belt set, lingerie set classy, Embroidered underwear,Floral lingerie set Zhgun Lingerie P 0 Y
16700 Plus Size Soft Stretch Mesh Lingerie Set classy, Transparent Underwear Beige Bra Top Zhgun Lingerie P 0 Y
16687 Customized Lingerie, transparent bodysuit, bodysuit women for under costumes Zhgun Lingerie P 0 Y
16803 Soft Mesh Bra-Top and Thong Panties with Adjustable Straps, See Through Lingerie set, Underwear Zhgun Lingerie P 0 Y
16677 Lingerie Set - Crotchless Lingerie - Open Cup Bra with Panties Zhgun Lingerie P 0 Y
16734 Bra made of lace and soft black elastic mesh,bra for large bust,Shelf Bra plus size,bra with support, lingerie for women Zhgun Lingerie P 0 Y
16721 See Through Mesh Panties on Low Waist with removable garters Zhgun Lingerie P 0 Y
16681 Black mesh lingerie set, Crotchless Panties, Open Cup Bra, Garter Belt Zhgun Lingerie P 0 Y
16667 White Wedding Lingerie Set, Bridal Honeymoon women underwear Zhgun Lingerie P 0 Y
16725 Classic thong panties with garter/stockings belt, lingerie set Zhgun Lingerie P 0 Y
16670 Black Lingerie Set - Mesh Corset Bra - High Waist Panties - Garter Belt Zhgun Lingerie P 0 Y
16695 Thong sheer panties with ruffle made of soft stretch mesh, many colors Zhgun Lingerie P 0 Y
16674 Leopard Lingerie Set - Open Bra, Garter Belt - Christmas Cosplay Lingerie Zhgun Lingerie P 0 Y
16691 bralette,slip panties with garter,belt corset, bra for large bust,black lingerie Zhgun Lingerie P 0 Y
16661 Lingerie set, bra and panty set Zhgun Lingerie P 0 Y
16708 Black See through sheer panties, lingerie women, mesh lace panty Zhgun Lingerie P 0 Y
16759 Lingerie set made of red lace and black soft mesh,bra panty garter belt set, lingerie set classy, Embroidered underwear,Floral lingerie set Zhgun Lingerie P 0 Y
16733 Transparent lingerie with chains,Bra and panty set,Mesh panty, Sheer bra,See thru underwear Zhgun Lingerie P 0 Y
16730 Soft Stretch Mesh Red Underwire Bra with Ruffle, Lingerie set, underwear women Zhgun Lingerie P 0 Y
16659 Black thong panties made of soft mesh Zhgun Lingerie P 0 Y
16732 Black mesh Open Cup lingerie set, Crotchless Thong Panties, Garter Belt, bra-corset, strappy lingerie Zhgun Lingerie P 0 Y
16690 Bra and panty set,lingerie set classy Zhgun Lingerie P 0 Y
16766 Embroidered red lingerie set,Floral lingerie set,Mesh bra,Belt,Floral mesh lingerie,Floral bralette,Lingerie flower Zhgun Lingerie P 0 Y
16750 Red panties with belt, See through sheer panties Zhgun Lingerie P 0 Y
16761 Bra and panty set,Mesh panty with removable garters ,Lingerie see through,See thru underwear Zhgun Lingerie P 0 Y
16763 Lingerie Set Women, Red underwear, Bra and Panty set Zhgun Lingerie P 0 Y
16688 Bra and panty set Zhgun Lingerie P 0 Y
16756 Bra made of red lace and soft black elastic mesh,bra for large bust,Shelf Bra plus size,bra with support, lingerie for women Zhgun Lingerie P 0 Y
16656 Black Lace Underwire Bra for Large Bust and Matching Thong Set Zhgun Lingerie P 0 Y
16780 Sheer bra,Transparent lingerie,Bra and panty set,Mesh panty,Lingerie see through,See thru underwear,See through bras Zhgun Lingerie P 0 Y
16689 Bralette,panties, garter belt, lace lingerie set Zhgun Lingerie P 0 Y
16752 Bra made of soft elastic mesh and delicate lace, Bra for large bust, Shelf brasserie plus size, Bra with support Zhgun Lingerie P 0 Y
16788 Transparent lingerie with removable chains,Bra and panty set,Mesh panty, Sheer bra,See thru underwear Zhgun Lingerie P 0 Y
16726 SET: Bra, panties, garter belt, Transparent lingerie set, Sheer bra,Bra and panty set,Lingerie see through,See thru underwear Zhgun Lingerie P 0 Y
16705 Bra and panty set,Mesh thong panty ,Lingerie see through, Sheer bralette Zhgun Lingerie P 0 Y
16738 Wedding Bridal Transparent lingerie set, Sheer bra,Bra and panty set,Mesh panty,Lingerie see through,See thru underwear Zhgun Lingerie P 0 Y
16706 Lace lingerie, Womens lingerie, Lace bra, Transparent lingerie, Seductive lingerie, Black lingerie Zhgun Lingerie P 0 Y
16671 Black Lingerie Set - Bra Bustier, Mesh underwear more colors Zhgun Lingerie P 0 Y
16698 Sheer bra,Transparent lingerie,Bra and panty set,Mesh panty,Lingerie see through,See thru underwear,See through bras, Belt corset Zhgun Lingerie P 0 Y
16787 Underbust corset - Handmade lingerie set in different colors / Nipple pads not included! Zhgun Lingerie P 0 Y
16735 Bra, Panties, Garter Belt, Transparent lingerie,Bra and panty set,Mesh panty,Lingerie see through,See thru underwear Zhgun Lingerie P 0 Y
16773 Bra corset, Panties, Garter Belt, Transparent lingerie,Bra and panty set,Mesh panty,Lingerie see through,See thru underwear Zhgun Lingerie P 0 Y
16764 Embroidered lingerie set,Mesh lingerie,Floral lingerie set,Floral bralette,Floral mesh lingerie,Lingerie flower,Bra,Panties,Garter belt Zhgun Lingerie P 0 Y
16760 Red Transparent lingerie set, Sheer bra,Bra and panty set,Lingerie see through,See thru underwear, Set of bra, panties, belt-corset Zhgun Lingerie P 0 Y
16778 Sheer bra,Transparent lingerie,Bra and panty set,Mesh panty,Lingerie sets sheer,See thru underwear Zhgun Lingerie P 0 Y
16679 Sheer bralette with panties and belt-corset,black lingerie set,underwear for large bust Zhgun Lingerie P 0 Y
16680 Bra and panty set,Elegant underwear,Black lingerie,Full lingerie set,Sheer thong,Floral lingerie set,Handmade lingerie Zhgun Lingerie P 0 Y
16699 Sheer bra,Transparent lingerie,Bra and panty set,Mesh panty,Lingerie see through,See thru underwear,See through bras, removable garters Zhgun Lingerie P 0 Y