SELECT 
  SQL_CALC_FOUND_ROWS products.product_id, 
  descr1.product as product, 
  companies.company as company_name, 
  products.product_type, 
  products.parent_product_id, 
  products.master_product_offers_count, 
  products.master_product_id, 
  products.company_id, 
  IF(
    products.age_verification = 'Y', 
    'Y', 
    IF(
      netting_categories.age_verification = 'Y', 
      'Y', netting_categories.parent_age_verification
    )
  ) as need_age_verification, 
  IF(
    products.age_limit > netting_categories.age_limit, 
    IF(
      products.age_limit > netting_categories.parent_age_limit, 
      products.age_limit, netting_categories.parent_age_limit
    ), 
    IF(
      netting_categories.age_limit > netting_categories.parent_age_limit, 
      netting_categories.age_limit, netting_categories.parent_age_limit
    )
  ) as age_limit 
FROM 
  netting_products as products 
  LEFT JOIN netting_product_descriptions as descr1 ON descr1.product_id = products.product_id 
  AND descr1.lang_code = 'en' 
  LEFT JOIN netting_product_prices as prices ON prices.product_id = products.product_id 
  AND prices.lower_limit = 1 
  LEFT JOIN netting_companies AS companies ON companies.company_id = products.company_id 
  INNER JOIN netting_products_categories as products_categories ON products_categories.product_id = products.product_id 
  INNER JOIN netting_categories ON netting_categories.category_id = products_categories.category_id 
  AND (
    netting_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, netting_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, netting_categories.usergroup_ids
    )
  ) 
  AND netting_categories.status IN ('A', 'H') 
  AND netting_categories.storefront_id IN (0, 1) 
  LEFT JOIN netting_warehouses_sum_products_amount as war_sum_amount ON war_sum_amount.product_id = products.product_id 
  LEFT JOIN netting_master_products_storefront_offers_count AS master_products_storefront_offers_count ON master_products_storefront_offers_count.product_id = products.product_id 
  AND master_products_storefront_offers_count.storefront_id = 1 
  LEFT JOIN netting_product_required_products ON products.product_id = netting_product_required_products.required_id 
WHERE 
  1 
  AND (
    companies.status IN ('A') 
    OR products.company_id = 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.master_product_status IN ('A') 
  AND products.master_product_id = 0 
  AND (
    products.company_id > 0 
    OR (
      master_products_storefront_offers_count.count > 0
    )
  ) 
  AND netting_product_required_products.product_id = 834 
  AND products.cp_is_installment_product = 'N' 
  AND products.product_type != 'D' 
GROUP BY 
  products.product_id 
ORDER BY 
  products.timestamp asc, 
  products.product_id ASC

Query time 0.00081

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "message": "Impossible WHERE noticed after reading const tables"
    }
  }
}