SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  products.amount, 
  descr1.product as product, 
  companies.company as company_name, 
  variation_group_products.group_id AS variation_group_id, 
  products.product_type, 
  products.parent_product_id 
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_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) 
  INNER JOIN cscart_product_variation_group_products AS variation_group_products ON variation_group_products.product_id = products.product_id 
WHERE 
  1 
  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 variation_group_products.group_id IN (
    1162, 1096, 1142, 1151, 1170, 1064, 1105, 
    1110, 1132, 1153, 1138, 1154, 1183, 
    1117, 1134, 1166, 1185, 1125, 1171, 
    1128, 1169, 1087, 1147, 1075, 1113, 
    1145, 1124, 1080, 1143, 1141, 1116, 
    1167, 1094, 1118, 1058, 1063, 1051
  ) 
  AND products.product_type != 'D' 
GROUP BY 
  products.product_id 
ORDER BY 
  NULL asc

Query time 0.00318

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "85.74"
    },
    "ordering_operation": {
      "using_filesort": false,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "table": {
              "table_name": "companies",
              "access_type": "ALL",
              "possible_keys": [
                "PRIMARY"
              ],
              "rows_examined_per_scan": 10,
              "rows_produced_per_join": 1,
              "filtered": "10.00",
              "cost_info": {
                "read_cost": "1.46",
                "eval_cost": "0.10",
                "prefix_cost": "1.56",
                "data_read_per_join": "6K"
              },
              "used_columns": [
                "company_id",
                "status",
                "company"
              ],
              "attached_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`companies`.`status` = 'A')"
            }
          },
          {
            "table": {
              "table_name": "variation_group_products",
              "access_type": "range",
              "possible_keys": [
                "PRIMARY",
                "idx_group_id"
              ],
              "key": "idx_group_id",
              "used_key_parts": [
                "group_id"
              ],
              "key_length": "3",
              "rows_examined_per_scan": 86,
              "rows_produced_per_join": 86,
              "filtered": "100.00",
              "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`variation_group_products`.`group_id` in (1162,1096,1142,1151,1170,1064,1105,1110,1132,1153,1138,1154,1183,1117,1134,1166,1185,1125,1171,1128,1169,1087,1147,1075,1113,1145,1124,1080,1143,1141,1116,1167,1094,1118,1058,1063,1051))",
              "using_join_buffer": "hash join",
              "cost_info": {
                "read_cost": "39.36",
                "eval_cost": "8.60",
                "prefix_cost": "49.52",
                "data_read_per_join": "1K"
              },
              "used_columns": [
                "product_id",
                "group_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "status"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 4,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "21.50",
                "eval_cost": "0.43",
                "prefix_cost": "79.62",
                "data_read_per_join": "19K"
              },
              "used_columns": [
                "product_id",
                "product_type",
                "status",
                "company_id",
                "amount",
                "usergroup_ids",
                "tracking",
                "parent_product_id"
              ],
              "attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`products`.`company_id` = `softwarepirmam_hewadelivard_cscart_4`.`companies`.`company_id`) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`amount` > 0) or (`softwarepirmam_hewadelivard_cscart_4`.`products`.`tracking` = 'D')) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`status` = 'A') and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`product_type` <> 'D'))"
            }
          },
          {
            "table": {
              "table_name": "products_categories",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "pt"
              ],
              "key": "pt",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id"
              ],
              "rows_examined_per_scan": 2,
              "rows_produced_per_join": 8,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "2.15",
                "eval_cost": "0.86",
                "prefix_cost": "82.63",
                "data_read_per_join": "137"
              },
              "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": [
                "softwarepirmam_hewadelivard_cscart_4.products_categories.category_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "2.15",
                "eval_cost": "0.04",
                "prefix_cost": "85.64",
                "data_read_per_join": "1K"
              },
              "used_columns": [
                "category_id",
                "storefront_id",
                "usergroup_ids",
                "status"
              ],
              "attached_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`status` in ('A','H')) and (`softwarepirmam_hewadelivard_cscart_4`.`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": [
                "softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.05",
                "eval_cost": "0.04",
                "prefix_cost": "85.74",
                "data_read_per_join": "1K"
              },
              "used_columns": [
                "product_id",
                "lang_code",
                "product"
              ]
            }
          }
        ]
      }
    }
  }
}

Result

product_id amount product company_name variation_group_id product_type parent_product_id
10991 100 Ray-Ban RB2213 55mm Delivard Store 1051 P 0
10992 100 Ray-Ban RB2213 55mm Delivard Store 1051 V 10991
11025 100 Ray-Ban New Wayfarer Classic 55mm Delivard Store 1058 V 11024
11024 100 Ray-Ban New Wayfarer Classic 55mm Delivard Store 1058 P 0
11081 100 Ray-Ban Original Wayfarer Classic 52mm Delivard Store 1063 V 11080
11080 100 Ray-Ban Original Wayfarer Classic 52mm Delivard Store 1063 P 0
11082 100 Ray-Ban Original Wayfarer Classic 52mm Delivard Store 1063 V 11080
11086 100 Ray-Ban RB2180 49mm Delivard Store 1064 P 0
11085 100 Ray-Ban RB2180 49mm Delivard Store 1064 V 11086
11137 100 Ray-Ban RB2216 61mm Delivard Store 1075 V 11136
11136 100 Ray-Ban RB2216 61mm Delivard Store 1075 P 0
11152 100 Ray-Ban Raimond 58mm Delivard Store 1080 P 0
11153 100 Ray-Ban Raimond 58mm Delivard Store 1080 V 11152
11236 100 Ray-Ban RB3717 60mm Delivard Store 1087 P 0
11237 100 Ray-Ban RB3717 60mm Delivard Store 1087 V 11236
11300 100 Ray-Ban New Round 50mm Delivard Store 1094 P 0
11301 100 Ray-Ban New Round 50mm Delivard Store 1094 V 11300
11306 100 Ray-Ban Clubmaster Reverse 54mm Delivard Store 1096 P 0
11307 100 Ray-Ban Clubmaster Reverse 54mm Delivard Store 1096 V 11306
11337 100 Ray-Ban RB4374 56mm Delivard Store 1105 P 0
11338 100 Ray-Ban RB4374 56mm Delivard Store 1105 V 11337
11348 100 Ray-Ban RB4461D 64mm Delivard Store 1110 P 0
11349 100 Ray-Ban RB4461D 64mm Delivard Store 1110 V 11348
11352 100 Ray-Ban RB3684CH Chromance 58mm Delivard Store 1113 P 0
11355 100 Ray-Ban RB3684CH Chromance 58mm Delivard Store 1113 V 11352
11360 100 Ray-Ban RB3727D 57mm Delivard Store 1116 P 0
11361 100 Ray-Ban RB3727D 57mm Delivard Store 1116 V 11360
11362 100 Ray-Ban Jim 55mm Delivard Store 1117 P 0
11363 100 Ray-Ban Jim 55mm Delivard Store 1117 V 11362
11364 100 Ray-Ban Aviator Classic 55mm Delivard Store 1118 P 0
11365 100 Ray-Ban Aviator Classic 55mm Delivard Store 1118 V 11364
11388 100 Ray-Ban Clubmaster Classic 55mm Delivard Store 1124 P 0
11389 100 Ray-Ban Clubmaster Classic 55mm Delivard Store 1124 V 11388
11390 100 Ray-Ban RB3683 56mm Delivard Store 1125 P 0
11391 100 Ray-Ban RB3683 56mm Delivard Store 1125 V 11390
11399 100 Ray-Ban Wayfarer Reverse 50mm Delivard Store 1128 P 0
11400 100 Ray-Ban Wayfarer Reverse 50mm Delivard Store 1128 V 11399
11411 100 Ray-Ban RB3687 61mm Delivard Store 1132 P 0
11412 100 Ray-Ban RB3687 61mm Delivard Store 1132 V 11411
11413 100 Ray-Ban RB3687 61mm Delivard Store 1132 V 11411
11416 100 Ray-Ban Oval Metal 54mm Delivard Store 1134 V 11414
11415 100 Ray-Ban Oval Metal 54mm Delivard Store 1134 V 11414
11414 100 Ray-Ban Oval Metal 54mm Delivard Store 1134 P 0
11417 100 Ray-Ban Oval Metal 54mm Delivard Store 1134 V 11414
11430 100 Ray-Ban RB3736 56mm Delivard Store 1138 P 0
11431 100 Ray-Ban RB3736 56mm Delivard Store 1138 V 11430
11439 100 Ray-Ban RB3750 59mm Delivard Store 1141 P 0
11441 100 Ray-Ban RB3750 59mm Delivard Store 1141 V 11439
11445 100 Ray-Ban RB3750 59mm Delivard Store 1141 V 11439
11446 100 Ray-Ban RB3750 62mm Delivard Store 1142 P 0
11447 100 Ray-Ban RB3750 62mm Delivard Store 1142 V 11446
11448 100 Ray-Ban RB3750 62mm Delivard Store 1142 V 11446
11453 100 Ray-Ban RB3751 58mm Delivard Store 1143 P 0
11454 100 Ray-Ban RB3751 58mm Delivard Store 1143 V 11453
11455 100 Ray-Ban RB3751 58mm Delivard Store 1143 V 11453
11458 100 Ray-Ban RB3809 55mm Delivard Store 1145 P 0
11460 100 Ray-Ban RB3809 55mm Delivard Store 1145 V 11458
11462 100 Ray-Ban RB3809 53mm Delivard Store 1147 P 0
11463 100 Ray-Ban RB3809 53mm Delivard Store 1147 V 11462
11472 100 Ray-Ban Old Aviator 62mm Delivard Store 1151 P 0
11474 100 Ray-Ban Old Aviator 62mm Delivard Store 1151 V 11472
11475 100 Ray-Ban Old Aviator 62mm Delivard Store 1151 V 11472
11477 100 Ray-Ban RB3832 55mm Delivard Store 1153 P 0
11478 100 Ray-Ban RB3832 55mm Delivard Store 1153 V 11477
11480 100 Ray-Ban RB3832 55mm Delivard Store 1153 V 11477
11479 100 Ray-Ban RB3768 56mm Delivard Store 1154 P 0
11481 100 Ray-Ban RB3768 56mm Delivard Store 1154 V 11479
11508 100 Ray-Ban RB3756 59mm Delivard Store 1162 P 0
11509 100 Ray-Ban RB3756 59mm Delivard Store 1162 V 11508
11520 100 Ray-Ban RB3947 57mm Delivard Store 1166 P 0
11521 100 Ray-Ban RB3947 57mm Delivard Store 1166 V 11520
11522 100 Ray-Ban RB4436D Bio-Based 55mm Delivard Store 1167 P 0
11523 100 Ray-Ban RB4436D Bio-Based 55mm Delivard Store 1167 V 11522
11530 100 Ray-Ban RB4258 50mm Delivard Store 1169 P 0
11532 100 Ray-Ban RB4258 50mm Delivard Store 1169 V 11530
11531 100 Ray-Ban RB4376 57mm Delivard Store 1170 P 0
11533 100 Ray-Ban RB4376 57mm Delivard Store 1170 V 11531
11534 100 Ray-Ban RB4376 57mm Delivard Store 1170 V 11531
11535 100 Ray-Ban RB4305 53mm Delivard Store 1171 P 0
11536 100 Ray-Ban RB4305 53mm Delivard Store 1171 V 11535
11598 100 Ray-Ban RB3767 54mm Delivard Store 1183 V 11600
11599 100 Ray-Ban RB3767 54mm Delivard Store 1183 V 11600
11600 100 Ray-Ban RB3767 54mm Delivard Store 1183 P 0
11633 100 Ray-Ban RB4306 54mm Delivard Store 1185 P 0
11634 100 Ray-Ban RB4306 54mm Delivard Store 1185 V 11633
11635 100 Ray-Ban RB4306 54mm Delivard Store 1185 V 11633
11636 100 Ray-Ban RB4306 54mm Delivard Store 1185 V 11633