SELECT 
  cscart_promotions.*, 
  cscart_promotion_descriptions.name, 
  cscart_promotion_descriptions.detailed_description, 
  cscart_promotion_descriptions.short_description 
FROM 
  cscart_promotions 
  LEFT JOIN cscart_promotion_descriptions ON cscart_promotion_descriptions.promotion_id = cscart_promotions.promotion_id 
  AND cscart_promotion_descriptions.lang_code = 'fr' 
  LEFT JOIN cscart_storefronts_promotions AS storefronts_promotions ON storefronts_promotions.promotion_id = cscart_promotions.promotion_id 
WHERE 
  1 
  AND IF(
    from_date, from_date <= 1729589400, 
    1
  ) 
  AND IF(to_date, to_date >= 1729589400, 1) 
  AND status IN ('A', 'H') 
  AND cscart_promotions.zone = 'catalog' 
  AND (
    storefronts_promotions.storefront_id = 1 
    OR storefronts_promotions.storefront_id IS NULL
  ) 
ORDER BY 
  cscart_promotions.stop_other_rules desc, 
  cscart_promotions.priority asc

Query time 0.00354

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "275.55"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "217.93"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_promotions",
            "access_type": "ALL",
            "rows_examined_per_scan": 19,
            "rows_produced_per_join": 1,
            "filtered": "10.00",
            "cost_info": {
              "read_cost": "7.85",
              "eval_cost": "0.38",
              "prefix_cost": "8.23",
              "data_read_per_join": "152"
            },
            "used_columns": [
              "promotion_id",
              "conditions",
              "bonuses",
              "to_date",
              "from_date",
              "priority",
              "stop",
              "zone",
              "conditions_hash",
              "status",
              "number_of_usages",
              "company_id",
              "users_conditions_hash",
              "stop_other_rules"
            ],
            "attached_condition": "(if(`ea201_francemaqu`.`cscart_promotions`.`from_date`,(`ea201_francemaqu`.`cscart_promotions`.`from_date` <= 1729589400),1) and if(`ea201_francemaqu`.`cscart_promotions`.`to_date`,(`ea201_francemaqu`.`cscart_promotions`.`to_date` >= 1729589400),1) and (`ea201_francemaqu`.`cscart_promotions`.`status` in ('A','H')) and (`ea201_francemaqu`.`cscart_promotions`.`zone` = 'catalog'))"
          }
        },
        {
          "table": {
            "table_name": "cscart_promotion_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "promotion_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "ea201_francemaqu.cscart_promotions.promotion_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.90",
              "eval_cost": "0.38",
              "prefix_cost": "10.51",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "promotion_id",
              "name",
              "short_description",
              "detailed_description",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "storefronts_promotions",
            "access_type": "index",
            "key": "PRIMARY",
            "used_key_parts": [
              "storefront_id",
              "promotion_id"
            ],
            "key_length": "8",
            "rows_examined_per_scan": 121,
            "rows_produced_per_join": 217,
            "filtered": "94.79",
            "using_index": true,
            "using_join_buffer": "Block Nested Loop",
            "cost_info": {
              "read_cost": "3.53",
              "eval_cost": "43.59",
              "prefix_cost": "57.62",
              "data_read_per_join": "3K"
            },
            "used_columns": [
              "storefront_id",
              "promotion_id"
            ],
            "attached_condition": "(<if>(found_match(storefronts_promotions), ((`ea201_francemaqu`.`storefronts_promotions`.`storefront_id` = 1) or isnull(`ea201_francemaqu`.`storefronts_promotions`.`storefront_id`)), true) and <if>(is_not_null_compl(storefronts_promotions), (`ea201_francemaqu`.`storefronts_promotions`.`promotion_id` = `ea201_francemaqu`.`cscart_promotions`.`promotion_id`), true))"
          }
        }
      ]
    }
  }
}

Result

promotion_id conditions bonuses to_date from_date priority stop zone conditions_hash status number_of_usages company_id users_conditions_hash stop_other_rules name detailed_description short_description
167 a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:1:{i:1;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:10:"categories";s:5:"value";s:3:"453";}}} a:1:{i:1;a:3:{s:5:"bonus";s:16:"product_discount";s:14:"discount_bonus";s:13:"by_percentage";s:14:"discount_value";s:2:"20";}} 0 0 0 N catalog categories=453 A 389 1 N Promotions -20% du 29/07 au 29/09 Promotions -20% du 29/07 au 29/09
330 a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:1:{i:1;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:8:"products";s:5:"value";s:139:"7555,7557,7558,7562,7574,7581,7585,7592,7593,7604,7606,7625,7639,7641,7651,7652,7681,7685,7693,7697,7699,7701,7703,7709,7715,8400,9244,7656";}}} a:1:{i:1;a:3:{s:5:"bonus";s:16:"product_discount";s:14:"discount_bonus";s:13:"by_percentage";s:14:"discount_value";s:2:"40";}} 1735685999 1665439200 0 N catalog products=7555,7557,7558,7562,7574,7581,7585,7592,7593,7604,7606,7625,7639,7641,7651,7652,7681,7685,7693,7697,7699,7701,7703,7709,7715,8400,9244,7656 A 863 1 N Promotion Humbrol