SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  descr1.product as product, 
  companies.company as company_name, 
  MIN(
    IF(
      prices.percentage_discount = 0, 
      prices.price, 
      prices.price - (
        prices.price * prices.percentage_discount
      )/ 100
    )
  ) as price, 
  products.product_type, 
  products.parent_product_id, 
  products.rf_stop_update_price, 
  products.rf_stop_update_amount, 
  products.rf_stop_update_status 
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) 
WHERE 
  1 
  AND cscart_categories.category_id IN (
    7148, 7149, 7150, 7151, 7152, 7160, 7161, 
    7162, 7227, 7156, 7157, 7194, 7218, 
    7158, 7159, 7247, 7263, 7163, 7164, 
    7207, 7208, 7224, 7243, 7225, 7283, 
    7266, 7267, 7313, 7314, 7342, 7348
  ) 
  AND companies.status IN ('A') 
  AND products.company_id IN (2, 8, 9, 10, 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.parent_product_id = 0 
  AND products.product_type != 'D' 
GROUP BY 
  products.product_id 
ORDER BY 
  price desc, 
  products.product_id ASC 
LIMIT 
  1728, 96

Query time 0.05674

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "84.91"
    },
    "ordering_operation": {
      "using_filesort": true,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "table": {
              "table_name": "companies",
              "access_type": "range",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "company_id"
              ],
              "key_length": "4",
              "rows_examined_per_scan": 5,
              "rows_produced_per_join": 0,
              "filtered": "12.50",
              "cost_info": {
                "read_cost": "2.20",
                "eval_cost": "0.06",
                "prefix_cost": "2.26",
                "data_read_per_join": "3K"
              },
              "used_columns": [
                "company_id",
                "status",
                "company"
              ],
              "attached_condition": "((`nuie_scalesta_net`.`companies`.`status` = 'A') and (`nuie_scalesta_net`.`companies`.`company_id` in (2,8,9,10,0)))"
            }
          },
          {
            "table": {
              "table_name": "cscart_categories",
              "access_type": "range",
              "possible_keys": [
                "PRIMARY",
                "c_status",
                "p_category_id"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "rows_examined_per_scan": 31,
              "rows_produced_per_join": 0,
              "filtered": "4.00",
              "using_join_buffer": "hash join",
              "cost_info": {
                "read_cost": "8.66",
                "eval_cost": "0.08",
                "prefix_cost": "11.00",
                "data_read_per_join": "2K"
              },
              "used_columns": [
                "category_id",
                "usergroup_ids",
                "status",
                "storefront_id"
              ],
              "attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`category_id` in (7148,7149,7150,7151,7152,7160,7161,7162,7227,7156,7157,7194,7218,7158,7159,7247,7263,7163,7164,7207,7208,7224,7243,7225,7283,7266,7267,7313,7314,7342,7348)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`cscart_categories`.`status` in ('A','H')) and (`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)))"
            }
          },
          {
            "table": {
              "table_name": "products_categories",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "pt"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "ref": [
                "nuie_scalesta_net.cscart_categories.category_id"
              ],
              "rows_examined_per_scan": 175,
              "rows_produced_per_join": 135,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "0.24",
                "eval_cost": "13.59",
                "prefix_cost": "24.83",
                "data_read_per_join": "2K"
              },
              "used_columns": [
                "product_id",
                "category_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "age_verification",
                "status",
                "idx_parent_product_id",
                "my_supplier_id",
                "supplier_access_time",
                "products_rf_product_code_index",
                "products_rf_manufacturer_code_index"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "nuie_scalesta_net.products_categories.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 6,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "33.97",
                "eval_cost": "0.68",
                "prefix_cost": "72.39",
                "data_read_per_join": "32K"
              },
              "used_columns": [
                "product_id",
                "product_type",
                "status",
                "company_id",
                "usergroup_ids",
                "parent_product_id",
                "rf_stop_update_price",
                "rf_stop_update_amount",
                "rf_stop_update_status"
              ],
              "attached_condition": "((`nuie_scalesta_net`.`products`.`company_id` = `nuie_scalesta_net`.`companies`.`company_id`) and (`nuie_scalesta_net`.`products`.`parent_product_id` = 0) and ((`nuie_scalesta_net`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`products`.`usergroup_ids`))) and (`nuie_scalesta_net`.`products`.`status` = 'A') and (`nuie_scalesta_net`.`products`.`product_type` <> 'D'))"
            }
          },
          {
            "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": [
                "nuie_scalesta_net.products_categories.product_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 6,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "1.70",
                "eval_cost": "0.68",
                "prefix_cost": "74.77",
                "data_read_per_join": "25K"
              },
              "used_columns": [
                "product_id",
                "lang_code",
                "product"
              ]
            }
          },
          {
            "table": {
              "table_name": "prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "usergroup",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "nuie_scalesta_net.products_categories.product_id"
              ],
              "rows_examined_per_scan": 12,
              "rows_produced_per_join": 7,
              "filtered": "8.99",
              "cost_info": {
                "read_cost": "1.72",
                "eval_cost": "0.76",
                "prefix_cost": "84.91",
                "data_read_per_join": "181"
              },
              "used_columns": [
                "product_id",
                "price",
                "percentage_discount",
                "lower_limit",
                "usergroup_id"
              ],
              "attached_condition": "((`nuie_scalesta_net`.`prices`.`lower_limit` = 1) and (`nuie_scalesta_net`.`prices`.`usergroup_id` in (0,0,1)))"
            }
          }
        ]
      }
    }
  }
}

Result

product_id product company_name price product_type parent_product_id rf_stop_update_price rf_stop_update_amount rf_stop_update_status
96549 237BPM0800-W-P Roxor 0.00000000 P 0 N N N
96550 237BPM0900-W-P Roxor 0.00000000 P 0 N N N
96551 237BPM1600-W-P Roxor 0.00000000 P 0 N N N
96552 237BPM1700-W-P Roxor 0.00000000 P 0 N N N
96553 237BPM1800-W-P Roxor 0.00000000 P 0 N N N
96554 237BPM1900-W-P Roxor 0.00000000 P 0 N N N
96555 237BPSW0700-W-P Roxor 0.00000000 P 0 N N N
96556 237BPSW0800-W-P Roxor 0.00000000 P 0 N N N
96557 237BPSW1700-W-P Roxor 0.00000000 P 0 N N N
96558 237BPSW1800-W-P Roxor 0.00000000 P 0 N N N
96562 237COMFORTRINGWH-P Roxor 0.00000000 P 0 N N N
96563 237COMFORTWH-P Roxor 0.00000000 P 0 N N N
96569 238CDOCMS001-R-P Roxor 0.00000000 P 0 N N N
96601 626048IHM-P Roxor 0.00000000 P 0 N N N
96602 626049IHM-P Roxor 0.00000000 P 0 N N N
96603 626049QBP-P Roxor 0.00000000 P 0 N N N
96604 626209-P Roxor 0.00000000 P 0 N N N
96605 626211-P Roxor 0.00000000 P 0 N N N
96606 626224-P Roxor 0.00000000 P 0 N N N
96607 626241-P Roxor 0.00000000 P 0 N N N
96608 626244-P Roxor 0.00000000 P 0 N N N
96609 626493-P Roxor 0.00000000 P 0 N N N
96610 626497-P Roxor 0.00000000 P 0 N N N
96611 626596MP-P Roxor 0.00000000 P 0 N N N
96612 626PBT41CP-P Roxor 0.00000000 P 0 N N N
96613 626PBT42CP-P Roxor 0.00000000 P 0 N N N
96614 626QHK01CP-P Roxor 0.00000000 P 0 N N N
96615 626R296W-P Roxor 0.00000000 P 0 N N N
96616 626SBW40SS-P Roxor 0.00000000 P 0 N N N
96617 626UST43CP-P Roxor 0.00000000 P 0 N N N
96618 626WBK83SS-P Roxor 0.00000000 P 0 N N N
96619 626WBV21BA-P Roxor 0.00000000 P 0 N N N
96620 626WHK03CP-P Roxor 0.00000000 P 0 N N N
96621 626WHO72CP-P Roxor 0.00000000 P 0 N N N
96622 626WHO74SS-P Roxor 0.00000000 P 0 N N N
96623 626WHO94CP-P Roxor 0.00000000 P 0 N N N
96624 626WHO95CP-P Roxor 0.00000000 P 0 N N N
96625 626WSB70SS-P Roxor 0.00000000 P 0 N N N
96626 626WSK23CP-P Roxor 0.00000000 P 0 N N N
96627 626WUS51WH-P Roxor 0.00000000 P 0 N N N
96628 626WUS52WH-P Roxor 0.00000000 P 0 N N N
96629 626WUS54WH-P Roxor 0.00000000 P 0 N N N
96630 69720120358-P Roxor 0.00000000 P 0 N N N
96631 69720120359-P Roxor 0.00000000 P 0 N N N
96632 69720120361-P Roxor 0.00000000 P 0 N N N
96633 69720120362-P Roxor 0.00000000 P 0 N N N
96634 69720120363-P Roxor 0.00000000 P 0 N N N
96635 69720120728-P Roxor 0.00000000 P 0 N N N
96636 69720120729-P Roxor 0.00000000 P 0 N N N
96637 69720719569-P Roxor 0.00000000 P 0 N N N
96638 69720721512-P Roxor 0.00000000 P 0 N N N
96639 69721230001-P Roxor 0.00000000 P 0 N N N
96640 69721230004-P Roxor 0.00000000 P 0 N N N
96641 697CAL04-P Roxor 0.00000000 P 0 N N N
96642 697CALP02-P Roxor 0.00000000 P 0 N N N
96643 697CALP04-P Roxor 0.00000000 P 0 N N N
96644 697CAV04-P Roxor 0.00000000 P 0 N N N
96645 697CRE02XSS-P Roxor 0.00000000 P 0 N N N
96646 697CRE04X-P Roxor 0.00000000 P 0 N N N
96647 697CRE04XSS-P Roxor 0.00000000 P 0 N N N
96648 697DSAX02-P Roxor 0.00000000 P 0 N N N
96649 697DSAX04-P Roxor 0.00000000 P 0 N N N
96650 697DSAX10-P Roxor 0.00000000 P 0 N N N
96651 697EME04-P Roxor 0.00000000 P 0 N N N
96652 697INT02-P Roxor 0.00000000 P 0 N N N
96653 697JUNIOR02-P Roxor 0.00000000 P 0 N N N
96654 697JUNS2-P Roxor 0.00000000 P 0 N N N
96655 697SAX04-P Roxor 0.00000000 P 0 N N N
96656 697SCI11WY-P Roxor 0.00000000 P 0 N N N
96657 697SCI51WY-P Roxor 0.00000000 P 0 N N N
96658 697SCK51WY-P Roxor 0.00000000 P 0 N N N
96659 697SEM11BL-P Roxor 0.00000000 P 0 N N N
96660 697SEM11WH-P Roxor 0.00000000 P 0 N N N
96661 697SON02-P Roxor 0.00000000 P 0 N N N
96662 697SON04-P Roxor 0.00000000 P 0 N N N
96663 697SON07-P Roxor 0.00000000 P 0 N N N
96664 697SON08-P Roxor 0.00000000 P 0 N N N
96665 697SONSS04-P Roxor 0.00000000 P 0 N N N
96666 697SSO15WH-P Roxor 0.00000000 P 0 N N N
96667 70020718747-P Roxor 0.00000000 P 0 N N N
96668 70030120429-P Roxor 0.00000000 P 0 N N N
96669 70030120439-P Roxor 0.00000000 P 0 N N N
96670 70030120602-P Roxor 0.00000000 P 0 N N N
96671 70030120603-P Roxor 0.00000000 P 0 N N N
96672 70030120604-P Roxor 0.00000000 P 0 N N N
96673 70030120605-P Roxor 0.00000000 P 0 N N N
96674 70030120606-P Roxor 0.00000000 P 0 N N N
96675 70030120608-P Roxor 0.00000000 P 0 N N N
96676 70030120609-P Roxor 0.00000000 P 0 N N N
96678 70030717610-P Roxor 0.00000000 P 0 N N N
96680 70030722166-P Roxor 0.00000000 P 0 N N N
96681 70030722167-P Roxor 0.00000000 P 0 N N N
96682 70030722168-P Roxor 0.00000000 P 0 N N N
96683 70030722169-P Roxor 0.00000000 P 0 N N N
96686 70030723423-P Roxor 0.00000000 P 0 N N N
96687 70030724233-P Roxor 0.00000000 P 0 N N N