SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  descr1.product as product, 
  companies.company as company_name, 
  products.product_type, 
  products.parent_product_id, 
  cscart_product_review_prepared_data.average_rating average_rating, 
  cscart_product_review_prepared_data.reviews_count product_reviews_count 
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 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = products.product_id 
  AND cscart_product_review_prepared_data.storefront_id = 0 
  LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = products.product_id 
WHERE 
  1 
  AND cscart_categories.category_id IN (
    101, 313, 341, 163, 165, 166, 168, 169, 
    171, 340
  ) 
  AND companies.status IN ('A') 
  AND (
    products.amount > 0 
    OR products.tracking = 'D'
  ) 
  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.parent_product_id = 0 
GROUP BY 
  products.product_id 
ORDER BY 
  popularity.total desc, 
  products.product_id ASC 
LIMIT 
  576, 32

Query time 0.70946

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "popularity.total desc, products.product_id",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "cscart_categories",
              "access_type": "range",
              "possible_keys": ["PRIMARY", "p_category_id"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["category_id"],
              "rows": 10,
              "filtered": 100,
              "attached_condition": "cscart_categories.category_id in (101,313,341,163,165,166,168,169,171,340)",
              "using_index": true
            }
          },
          {
            "table": {
              "table_name": "products_categories",
              "access_type": "ref",
              "possible_keys": ["PRIMARY", "pt"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["category_id"],
              "ref": ["dev_db.cscart_categories.category_id"],
              "rows": 359,
              "filtered": 100,
              "using_index": true
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY", "status", "idx_parent_product_id"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["product_id"],
              "ref": ["dev_db.products_categories.product_id"],
              "rows": 1,
              "filtered": 18.48341942,
              "attached_condition": "products.parent_product_id = 0 and (products.amount > 0 or products.tracking = 'D') and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids)) and products.`status` = 'A'"
            }
          },
          {
            "table": {
              "table_name": "companies",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY"],
              "key": "PRIMARY",
              "key_length": "4",
              "used_key_parts": ["company_id"],
              "ref": ["dev_db.products.company_id"],
              "rows": 1,
              "filtered": 100,
              "attached_condition": "companies.`status` = 'A'"
            }
          },
          {
            "table": {
              "table_name": "descr1",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY", "product_id"],
              "key": "PRIMARY",
              "key_length": "11",
              "used_key_parts": ["product_id", "lang_code"],
              "ref": ["dev_db.products_categories.product_id", "const"],
              "rows": 1,
              "filtered": 100,
              "attached_condition": "trigcond(descr1.lang_code = 'en')"
            }
          },
          {
            "table": {
              "table_name": "cscart_product_review_prepared_data",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY"],
              "key": "PRIMARY",
              "key_length": "7",
              "used_key_parts": ["product_id", "storefront_id"],
              "ref": ["dev_db.products_categories.product_id", "const"],
              "rows": 1,
              "filtered": 100
            }
          },
          {
            "table": {
              "table_name": "popularity",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY", "total"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["product_id"],
              "ref": ["dev_db.products_categories.product_id"],
              "rows": 1,
              "filtered": 100
            }
          },
          {
            "table": {
              "table_name": "prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "product_id",
              "key_length": "3",
              "used_key_parts": ["product_id"],
              "ref": ["dev_db.products_categories.product_id"],
              "rows": 1,
              "filtered": 99.9960556,
              "attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id product company_name product_type parent_product_id average_rating product_reviews_count
32312 Purple Iris Morning Ceramic Mug, Summer Colors Collection, Vietnamese Ceramics, Summer Mug, Handmade Mug, Gift Mug, Thoughtful Gift, Birthday Gift Lina Pottery by Minh Tien Ceramic P 0 5.00 1
38159 "Thanh" Essential Oil Scented Candle For Aromatherapy Tiệm Thơm Nức - Aromatherapy P 0 5.00 1
33282 Mint & Coco Nectar Soap, Effective Skin Cleanser, Nourishes Healthy Skin, Cold Processed, Handmade Soap Odes Naturelles P 0 5.00 1
647 Macrame 2-Storey Wall Shelves, Vintage European Style, Minimalist Design, High Durability, Resistant to Mildew, Anti-Yellowing Thừng Gỗ Decor P 0 5.00 1
27921 Blue Dot Ceramic Cup, Made of Bat Trang Ceramic, High Aesthetic Value, Skilled Artisans, Product of Vietnamese Ceramic Industry The Goods P 0
23992 Simple Waist Apron, Youthful and Dynamic Design, with Pockets and Adjustable Straps, Wrinkle-Resistant Material, Protects Clothes from Dirt Ngói P 0 0
6521 Checkpoint Checked Coasters, Playful and Fun Patterns, Vibrant Colors, Excellent Water Absorption, High Durability, Easy to Clean Hở buôn chà P 0 5.00 1
3010 Ceramic Swedish Round Plate, Wattle Green Collection, Fire Glaze Ceramics, Skillful Techniques, High Quality, Decoration, Vietnamese Ceramics Gốm Đông Gia P 0 5.00 3
2236 Set Of White Jar & 4 Wooden Flower Branches, Delightful Decorative Items, Vase Made from Bat Trang Ceramic, Exquisite Handcrafted Artwork Mood Up P 0 5.00 1
5143 Cloud Scented Candle OnaTree - Vietnamese Cosmetics P 0 5.00 1
3514 Pipa Ceramic Teapot, Vietnamese Ceramics, Household Items, Ceramic, Rustic, Kitchenware, Handmade, Aesthetic, Non-toxic, Decorations, Gift Ideas Tu Hú Ceramics P 0 4.95 19
46696 Paper Flower Painting, Lily of the Valley MAYPAPERFLOWER Wooden Frame of 20 x 25cm, Interior Decoration, Handmade Gifts, Personalized Gifts Maypaperflower P 0 5.00 10
25245 Aroma Scented Candle Tin Box Onio Soapery P 0 5.00 1
2872 Harvest Gold Ceramic Dinnerware (Set of 10 Items), Single Set for 1 Person, Glossy Gold Color, High-Quality, Elegant Design, Elevating Space Gốm Đông Gia P 0 5.00 3
649 Macrame 3-Storey Wall Curtain, High Durability, Excellent Thermal Insulation, Moisture Absorption Ability, Handcrafted Product Thừng Gỗ Decor P 0
376 Pure Agarwood Nhang Sen Liên Tâm P 0 0
29732 Voile Maiden Scented Candle Ojalá candles P 0 0
2584 Macrame Plant Hanger, 3 Pots, Smart Design, Space-Saving, Decor for Green Spaces, Handmade Product, Sustainable Production Thừng Gỗ Decor P 0
3190 Natural Soy Wax Scented Candle, Pine Limart - Zero waste P 0 0
33132 Blooming Valley Scented Candle, Floral Scented Candle, Soy Wax Candle, Natural Essential Oil Candle, Gift Candle, Relaxation Candle, Lovely Gift The Joy Box P 0 5.00 22
32318 Boat-Shaped Ceramic Dipping Bowl, Vietnamese Ceramics, Ceramic Dipping Bowl, Mini Boat Serving Dish, Appetizer Dish, Sauce Dish, Housewarming Gift Lina Pottery by Minh Tien Ceramic P 0 4.88 8
3195 Natural Soy Wax Scented Candle, Sweet Orange Limart - Zero waste P 0 5.00 3
48822 "Dream of Klim" Wool Art Paintings, Wool Paintings, Handmade Gifts, Art Paintings, Hanging Paintings, Interior Decoration, Still Life Style Paintings, Unique Gifts Woolart by lybangnguyen P 0 5.00 8
32305 Mexican Sunflower Ceramic Vase, Handmade Ceramic, Decorative Vase, Home Décor Vase, Vietnamese Pottery, Gift Idea, Housewarming Gift, Anniversary Gift Lina Pottery by Minh Tien Ceramic P 0 5.00 4
6109 White 3-Compartment Tank Tray, Made from Recycled Materials, Durable Product, Keep Items Neatly Organized, Decorative for Study Desk Rina Craft P 0 5.00 2
5647 Agarwood Cone Incense, Cleanses The Body And Mind, Relaxes The Mind, Sourced From Natural Origins, Ensures Quality, Suitable For Meditation RỊ MỌ HOUSE P 0
2858 Ceramic Dip Bowl, Harvest Gold Collection, Fire Glaze Ceramics, Small Ceramic Bowl, Serving Bowl For Dips, Saucer Dish, Vietnamese Ceramics, Housewarming Gift Gốm Đông Gia P 0 5.00 3
813 Handmade Macrame Lampshade, Made of Cotton Rope, Unique Patterns, Elegant Design, High Durability, Resistant to Yellowing, Home Decoration Artspace P 0 0
36573 Daisies And Tea Decorative Art Print, Size A3 / A4, Included Frame, Neat Composition, Soft Colors, Artistic Painting Nhu Pham Art P 0 5.00 1
6646 Scented Hanging Wax Onio Soapery P 0 5.00 1
1973 80gr “Falling In Love” Handmade Scented Soy Candle Tin Chia Kandles P 0 0
19207 Double Espresso Ceramic Cup, Vietnamese Ceramics, Household Items, Ceramic, Rustic, Kitchenware, Handmade, Aesthetic, Non-toxic, Decorations, Gift Ideas Tu Hú Ceramics P 0 5.00 7