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 (7192) 
  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 
  1344, 96

Query time 0.01490

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "619.06"
    },
    "ordering_operation": {
      "using_filesort": true,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "table": {
              "table_name": "cscart_categories",
              "access_type": "const",
              "possible_keys": [
                "PRIMARY",
                "c_status",
                "p_category_id"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "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": "2K"
              },
              "used_columns": [
                "category_id",
                "usergroup_ids",
                "status",
                "storefront_id"
              ]
            }
          },
          {
            "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": "products_categories",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "pt"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "category_id"
              ],
              "key_length": "3",
              "ref": [
                "const"
              ],
              "rows_examined_per_scan": 1751,
              "rows_produced_per_join": 1094,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "0.56",
                "eval_cost": "109.44",
                "prefix_cost": "112.26",
                "data_read_per_join": "17K"
              },
              "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": 54,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "273.59",
                "eval_cost": "5.47",
                "prefix_cost": "495.29",
                "data_read_per_join": "262K"
              },
              "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": 54,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "13.68",
                "eval_cost": "5.47",
                "prefix_cost": "514.44",
                "data_read_per_join": "208K"
              },
              "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": 16,
              "rows_produced_per_join": 90,
              "filtered": "9.92",
              "cost_info": {
                "read_cost": "13.93",
                "eval_cost": "9.00",
                "prefix_cost": "619.06",
                "data_read_per_join": "2K"
              },
              "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
93680 LIL3122GMT2 Roxor 0.00000000 P 0 N N N
93681 LIL3122W Roxor 0.00000000 P 0 N N N
93682 LIL3122W2 Roxor 0.00000000 P 0 N N N
93683 LIL3122WMT Roxor 0.00000000 P 0 N N N
93684 LIL3122WMT2 Roxor 0.00000000 P 0 N N N
93685 LIL3124CMT Roxor 0.00000000 P 0 N N N
93686 LIL3124CMT2 Roxor 0.00000000 P 0 N N N
93687 LIL3124GMT Roxor 0.00000000 P 0 N N N
93688 LIL3124GMT2 Roxor 0.00000000 P 0 N N N
93689 LIL3124W Roxor 0.00000000 P 0 N N N
93690 LIL3124W2 Roxor 0.00000000 P 0 N N N
93691 LIL3124WMT Roxor 0.00000000 P 0 N N N
93692 LIL3124WMT2 Roxor 0.00000000 P 0 N N N
93693 LIL3125CMT Roxor 0.00000000 P 0 N N N
93694 LIL3125GMT Roxor 0.00000000 P 0 N N N
93695 LIL3125W Roxor 0.00000000 P 0 N N N
93696 LIL3125WMT Roxor 0.00000000 P 0 N N N
93697 LIL3126CMT Roxor 0.00000000 P 0 N N N
93698 LIL3126GMT Roxor 0.00000000 P 0 N N N
93699 LIL3126W Roxor 0.00000000 P 0 N N N
93700 LIL3126WMT Roxor 0.00000000 P 0 N N N
93701 LIL3133CMT Roxor 0.00000000 P 0 N N N
93702 LIL3133CMT2 Roxor 0.00000000 P 0 N N N
93703 LIL3133GMT Roxor 0.00000000 P 0 N N N
93704 LIL3133GMT2 Roxor 0.00000000 P 0 N N N
93705 LIL3133W Roxor 0.00000000 P 0 N N N
93706 LIL3133W2 Roxor 0.00000000 P 0 N N N
93707 LIL3133WMT Roxor 0.00000000 P 0 N N N
93708 LIL3133WMT2 Roxor 0.00000000 P 0 N N N
93709 LIL3135CMT Roxor 0.00000000 P 0 N N N
93710 LIL3135GMT Roxor 0.00000000 P 0 N N N
93711 LIL3135W Roxor 0.00000000 P 0 N N N
93712 LIL3135WMT Roxor 0.00000000 P 0 N N N
93713 LIL3222CMT Roxor 0.00000000 P 0 N N N
93714 LIL3222CMT2 Roxor 0.00000000 P 0 N N N
93715 LIL3222GMT Roxor 0.00000000 P 0 N N N
93716 LIL3222GMT2 Roxor 0.00000000 P 0 N N N
93717 LIL3222W Roxor 0.00000000 P 0 N N N
93718 LIL3222W2 Roxor 0.00000000 P 0 N N N
93719 LIL3222WMT Roxor 0.00000000 P 0 N N N
93720 LIL3222WMT2 Roxor 0.00000000 P 0 N N N
93721 LIL3224CMT Roxor 0.00000000 P 0 N N N
93722 LIL3224CMT2 Roxor 0.00000000 P 0 N N N
93723 LIL3224GMT Roxor 0.00000000 P 0 N N N
93724 LIL3224GMT2 Roxor 0.00000000 P 0 N N N
93725 LIL3224W Roxor 0.00000000 P 0 N N N
93726 LIL3224W2 Roxor 0.00000000 P 0 N N N
93727 LIL3224WMT Roxor 0.00000000 P 0 N N N
93728 LIL3224WMT2 Roxor 0.00000000 P 0 N N N
93729 LIL3225CMT Roxor 0.00000000 P 0 N N N
93730 LIL3225GMT Roxor 0.00000000 P 0 N N N
93731 LIL3225W Roxor 0.00000000 P 0 N N N
93732 LIL3225WMT Roxor 0.00000000 P 0 N N N
93733 LIL3226CMT Roxor 0.00000000 P 0 N N N
93734 LIL3226GMT Roxor 0.00000000 P 0 N N N
93735 LIL3226W Roxor 0.00000000 P 0 N N N
93736 LIL3226WMT Roxor 0.00000000 P 0 N N N
93737 LIL3233CMT Roxor 0.00000000 P 0 N N N
93738 LIL3233CMT2 Roxor 0.00000000 P 0 N N N
93739 LIL3233GMT Roxor 0.00000000 P 0 N N N
93740 LIL3233GMT2 Roxor 0.00000000 P 0 N N N
93741 LIL3233W Roxor 0.00000000 P 0 N N N
93742 LIL3233W2 Roxor 0.00000000 P 0 N N N
93743 LIL3233WMT Roxor 0.00000000 P 0 N N N
93744 LIL3233WMT2 Roxor 0.00000000 P 0 N N N
93745 LIL3235CMT Roxor 0.00000000 P 0 N N N
93746 LIL3235GMT Roxor 0.00000000 P 0 N N N
93747 LIL3235W Roxor 0.00000000 P 0 N N N
93748 LIL3235WMT Roxor 0.00000000 P 0 N N N
93872 QUA001LCM Roxor 0.00000000 P 0 N N N
93873 QUA002LCM Roxor 0.00000000 P 0 N N N
93874 QUA003LCM Roxor 0.00000000 P 0 N N N
93875 QUA005LCM Roxor 0.00000000 P 0 N N N
93876 QUA006LCM Roxor 0.00000000 P 0 N N N
93877 QUA007LCM Roxor 0.00000000 P 0 N N N
94034 URB104LBG2 Roxor 0.00000000 P 0 N N N
94035 URB104LCM Roxor 0.00000000 P 0 N N N
94036 URB104LCM2 Roxor 0.00000000 P 0 N N N
94037 URB104LSB2 Roxor 0.00000000 P 0 N N N
94038 URB104LSW2 Roxor 0.00000000 P 0 N N N
94039 URB106LCM Roxor 0.00000000 P 0 N N N
94040 URB1404LBG2 Roxor 0.00000000 P 0 N N N
94041 URB1404LCM Roxor 0.00000000 P 0 N N N
94042 URB1404LCM2 Roxor 0.00000000 P 0 N N N
94043 URB1404LSB2 Roxor 0.00000000 P 0 N N N
94044 URB1404LSW2 Roxor 0.00000000 P 0 N N N
94045 URB1406LCM Roxor 0.00000000 P 0 N N N
94046 URB204LBG2 Roxor 0.00000000 P 0 N N N
94047 URB204LCM Roxor 0.00000000 P 0 N N N
94048 URB204LCM2 Roxor 0.00000000 P 0 N N N
94049 URB204LSB2 Roxor 0.00000000 P 0 N N N
94050 URB204LSW2 Roxor 0.00000000 P 0 N N N
94051 URB206LCM Roxor 0.00000000 P 0 N N N
94052 URB304LBG2 Roxor 0.00000000 P 0 N N N
94053 URB304LCM Roxor 0.00000000 P 0 N N N
94054 URB304LCM2 Roxor 0.00000000 P 0 N N N