SELECT 
  products.product_id, 
  products.list_price, 
  prices.price, 
  products.amount, 
  descr1.product as product, 
  companies.company as company_name, 
  products.product_type, 
  products.parent_product_id, 
  products.company_id, 
  prpd.average_rating, 
  prpd.reviews_count, 
  pvd.variant as brand_name, 
  ab.amount as co_purchase_count 
FROM 
  cscart_also_bought_products ab 
  INNER JOIN cscart_products as products ON products.product_id = ab.related_id 
  AND products.status = 'A' 
  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 
  LEFT JOIN cscart_product_review_prepared_data AS prpd ON prpd.product_id = products.product_id 
  LEFT JOIN cscart_product_features_values AS pfv ON pfv.product_id = products.product_id 
  AND pfv.feature_id = 62 
  LEFT JOIN cscart_product_feature_variant_descriptions AS pvd ON pfv.variant_id = pvd.variant_id 
  AND pvd.lang_code = 'en' 
WHERE 
  ab.product_id = 3564 
  AND ab.amount >= 2 
  AND products.parent_product_id = 0 
  AND (
    products.amount > 0 
    OR products.tracking = 'D'
  ) 
GROUP BY 
  products.product_id 
ORDER BY 
  ab.amount DESC 
LIMIT 
  8

Query time 0.00521

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "257.23"
    },
    "ordering_operation": {
      "using_filesort": true,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "table": {
              "table_name": "ab",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "const"
              ],
              "rows_examined_per_scan": 806,
              "rows_produced_per_join": 268,
              "filtered": "33.33",
              "cost_info": {
                "read_cost": "1.65",
                "eval_cost": "26.86",
                "prefix_cost": "82.25",
                "data_read_per_join": "4K"
              },
              "used_columns": [
                "product_id",
                "related_id",
                "amount"
              ],
              "attached_condition": "(`cscart_db`.`ab`.`amount` >= 2)"
            }
          },
          {
            "table": {
              "table_name": "products",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "age_verification",
                "status",
                "idx_parent_product_id",
                "idx_master_product_id",
                "youtube_link",
                "idx_products_parent_lookup",
                "idx_products_status_company",
                "idx_products_master_status",
                "idx_products_inventory",
                "idx_products_status_company_master",
                "idx_products_main_query",
                "idx_products_query_opt",
                "idx_products_composite_query",
                "idx_kl_qc_enabled"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "cscart_db.ab.related_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 14,
              "filtered": "5.43",
              "cost_info": {
                "read_cost": "84.85",
                "eval_cost": "1.46",
                "prefix_cost": "193.97",
                "data_read_per_join": "76K"
              },
              "used_columns": [
                "product_id",
                "product_type",
                "status",
                "company_id",
                "list_price",
                "amount",
                "tracking",
                "parent_product_id"
              ],
              "attached_condition": "((`cscart_db`.`products`.`parent_product_id` = 0) and ((`cscart_db`.`products`.`amount` > 0) or (`cscart_db`.`products`.`tracking` = 'D')) and (`cscart_db`.`products`.`status` = 'A'))"
            }
          },
          {
            "table": {
              "table_name": "descr1",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "product_id",
                "idx_product_desc_lang",
                "idx_product_name_search",
                "idx_product_desc_sort"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id",
                "lang_code"
              ],
              "key_length": "9",
              "ref": [
                "cscart_db.ab.related_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 14,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "11.96",
                "eval_cost": "1.46",
                "prefix_cost": "207.38",
                "data_read_per_join": "66K"
              },
              "used_columns": [
                "product_id",
                "lang_code",
                "product"
              ]
            }
          },
          {
            "table": {
              "table_name": "prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "idx_prices_discount_lookup",
                "idx_prices_min_calc",
                "idx_prices_usergroup_lookup"
              ],
              "key": "idx_prices_discount_lookup",
              "used_key_parts": [
                "product_id",
                "lower_limit"
              ],
              "key_length": "6",
              "ref": [
                "cscart_db.ab.related_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 14,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "4.18",
                "eval_cost": "1.46",
                "prefix_cost": "213.02",
                "data_read_per_join": "350"
              },
              "used_columns": [
                "product_id",
                "price",
                "lower_limit",
                "usergroup_id"
              ]
            }
          },
          {
            "table": {
              "table_name": "companies",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "company_id"
              ],
              "key_length": "4",
              "ref": [
                "cscart_db.products.company_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 14,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "3.65",
                "eval_cost": "1.46",
                "prefix_cost": "218.12",
                "data_read_per_join": "101K"
              },
              "used_columns": [
                "company_id",
                "company"
              ]
            }
          },
          {
            "table": {
              "table_name": "prpd",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "product_id"
              ],
              "key_length": "3",
              "ref": [
                "cscart_db.ab.related_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 29,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "3.97",
                "eval_cost": "2.92",
                "prefix_cost": "225.01",
                "data_read_per_join": "466"
              },
              "used_columns": [
                "product_id",
                "storefront_id",
                "average_rating",
                "reviews_count"
              ]
            }
          },
          {
            "table": {
              "table_name": "pfv",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "product_id",
                "fpl",
                "idx_product_feature_variant_id",
                "fl"
              ],
              "key": "idx_product_feature_variant_id",
              "used_key_parts": [
                "product_id",
                "feature_id"
              ],
              "key_length": "6",
              "ref": [
                "cscart_db.ab.related_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 35,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "16.95",
                "eval_cost": "3.51",
                "prefix_cost": "245.46",
                "data_read_per_join": "1K"
              },
              "used_columns": [
                "feature_id",
                "product_id",
                "variant_id",
                "lang_code"
              ]
            }
          },
          {
            "table": {
              "table_name": "pvd",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "variant_id",
                "lang_code"
              ],
              "key_length": "9",
              "ref": [
                "cscart_db.pfv.variant_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 35,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "8.26",
                "eval_cost": "3.51",
                "prefix_cost": "257.23",
                "data_read_per_join": "262K"
              },
              "used_columns": [
                "variant_id",
                "variant",
                "lang_code"
              ]
            }
          }
        ]
      }
    }
  }
}

Result

product_id list_price price amount product company_name product_type parent_product_id company_id average_rating reviews_count brand_name co_purchase_count
3562 1570.00 1099.00 36 Vitamin C | Brightening Boost | Serum | 35ml Roadskye Tradecom Pvt. Ltd. P 0 13 4.78 60 Klairs 128
37830 1960.00 1372.00 8799 Rice Extract | Brightening & Hydration | Face Toner | 150ml Roadskye Tradecom Pvt. Ltd. P 0 13 4.86 51 I'm From 45
3574 2050.00 1435.00 138 Midnight Blue Youth Activating Drop - 20ml Roadskye Tradecom Pvt. Ltd. P 0 13 4.88 8 Klairs 40
3976 1390.00 904.00 3423 Ultimate Nourishing Rice Overnight Face Mask | 60ml Roadskye Tradecom Pvt. Ltd. P 0 13 4.64 11 COSRX 26
66982 1070.00 802.50 183 UV Aqua Rich Watery Essence Sunscreen SPF 50+ PA++++ | 50gm Roadskye Tradecom Pvt. Ltd. P 0 13 4.86 7 Biore 26
3557 350.00 245.00 83 Supple Preparation Facial Toner [30ml] Roadskye Tradecom Pvt. Ltd. P 0 13 5.00 7 Klairs 21
10154 1710.00 1197.00 142 Klairs Illuminating supple blemish cream - 40ml Roadskye Tradecom Pvt. Ltd. P 0 13 4.80 10 Klairs 19
3967 1950.00 1268.00 434 Balancium Comfort Ceramide Face Cream Moisturiser | 80gm Roadskye Tradecom Pvt. Ltd. P 0 13 4.77 13 COSRX 19