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 = 'en' 
  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 <= 1790203623, 
    1
  ) 
  AND IF(to_date, to_date >= 1790203623, 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.00106

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "61.73"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "19.80"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "storefronts_promotions",
            "access_type": "system",
            "rows_examined_per_scan": 0,
            "rows_produced_per_join": 1,
            "filtered": "0.00",
            "const_row_not_found": true,
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.10",
              "prefix_cost": "0.00",
              "data_read_per_join": "16"
            },
            "used_columns": [
              "storefront_id",
              "promotion_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_promotions",
            "access_type": "range",
            "possible_keys": [
              "status_idx",
              "zone_idx"
            ],
            "key": "status_idx",
            "used_key_parts": [
              "status"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 35,
            "rows_produced_per_join": 19,
            "filtered": "56.57",
            "index_condition": "(`cscart_db`.`cscart_promotions`.`status` in ('A','H'))",
            "cost_info": {
              "read_cost": "37.97",
              "eval_cost": "1.98",
              "prefix_cost": "39.95",
              "data_read_per_join": "18K"
            },
            "used_columns": [
              "promotion_id",
              "company_id",
              "conditions",
              "bonuses",
              "to_date",
              "from_date",
              "priority",
              "stop",
              "kc_activate",
              "exclude_kc_commission",
              "zone",
              "conditions_hash",
              "status",
              "number_of_usages",
              "users_conditions_hash",
              "cp_em_for_notices",
              "stop_other_rules",
              "user_id",
              "aff_plan_id",
              "status_spin_to_win",
              "coupon_code",
              "show_best_price_on"
            ],
            "attached_condition": "((0 <> if(`cscart_db`.`cscart_promotions`.`from_date`,(`cscart_db`.`cscart_promotions`.`from_date` <= 1790203623),1)) and (0 <> if(`cscart_db`.`cscart_promotions`.`to_date`,(`cscart_db`.`cscart_promotions`.`to_date` >= 1790203623),1)) and (`cscart_db`.`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": [
              "cscart_db.cscart_promotions.promotion_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 19,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "1.98",
              "prefix_cost": "41.93",
              "data_read_per_join": "46K"
            },
            "used_columns": [
              "promotion_id",
              "name",
              "short_description",
              "detailed_description",
              "lang_code"
            ]
          }
        }
      ]
    }
  }
}

Result

promotion_id company_id conditions bonuses to_date from_date priority stop kc_activate exclude_kc_commission zone conditions_hash status number_of_usages users_conditions_hash cp_em_for_notices stop_other_rules user_id aff_plan_id status_spin_to_win coupon_code show_best_price_on name detailed_description short_description
1764 0 a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:2:{i:2;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:8:"products";s:5:"value";s:2064:"31317,31318,31319,31320,31321,31322,31323,31324,31325,31326,31327,31328,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31344,31345,31346,31347,31348,31349,31350,31351,31352,31353,31354,31355,31356,31357,31358,31359,31360,31361,31362,31363,31364,31365,31366,31367,31368,31369,31370,31371,31372,31373,31374,31375,31376,31377,31378,31379,31380,31381,31382,31383,31384,31385,31484,31485,30102,30103,30104,30105,30106,30107,30108,30109,30110,30111,30112,30113,30114,30115,30116,30117,30118,30119,30120,30121,30122,30123,30124,30125,30126,30127,30128,30129,30130,30131,30132,30133,30134,30135,30136,30137,30138,30139,30140,30141,30142,30143,30144,30145,30146,30147,30148,30149,30150,30151,30018,30019,30020,30021,30022,30023,30024,30025,30026,30027,30028,30029,30030,30031,30032,30033,30034,30035,30036,30037,30038,30039,30040,30341,30342,30343,30344,30345,30346,30347,30348,30349,30350,30351,30352,30353,30354,30355,30356,31301,31302,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,30043,30044,30045,30046,30047,30048,30049,30050,30051,30052,30053,30054,30055,30056,30057,30058,30059,30060,30061,30062,30063,30064,30065,30066,30067,30068,30069,30070,30071,30072,30073,30074,30075,30076,30077,30078,30079,30080,30081,30082,30083,30084,30085,30086,30087,30088,30089,30090,30091,30092,30093,30094,30095,30096,30097,30098,30099,30100,30101,33896,33897,33898,33899,33901,33902,33903,33904,33905,33906,33907,33908,33909,33910,33911,33912,33913,33914,33915,33916,33917,33918,33919,33920,3579,3580,3581,3582,3583,13865,13866,13867,13868,13869,13870,13871,13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,13884,13885,13886,13887,13888,13889,13890,13891,13892,13939,13940,13941,13942,13943,13944,13945,13946,13947,13948,13949,13950,13951,13952,13953,13954,13955,13956,13957,33694,33695,33696,33697,33698,33699,33700,33701,33702,33703,33704,33705,33706,33707,33708,33709,33710,33711,33712,33713,33714,33715,33716,33717,33718,33719,33720,33721,33722,34022,34023,30333,30334,30335,30336,30337,30338,30339,30340";}i:3;a:3:{s:3:"set";s:3:"any";s:9:"set_value";s:1:"1";s:10:"conditions";a:4:{i:1;a:3:{s:8:"operator";s:2:"eq";s:9:"condition";s:9:"usergroup";s:5:"value";s:2:"60";}i:2;a:3:{s:8:"operator";s:2:"eq";s:9:"condition";s:9:"usergroup";s:5:"value";s:2:"42";}i:3;a:3:{s:8:"operator";s:2:"eq";s:9:"condition";s:9:"usergroup";s:5:"value";s:2:"39";}i:4;a:3:{s:8:"operator";s:2:"eq";s:9:"condition";s:9:"usergroup";s:5:"value";s:2:"68";}}}}} 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:"25";}} 0 0 16777215 N N N catalog products=31317,31318,31319,31320,31321,31322,31323,31324,31325,31326,31327,31328,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31344,31345,31346,31347,31348,31349,31350,31351,31352,31353,31354,31355,31356,31357,31358,31359,31360,31361,31362,31363,31364,31365,31366,31367,31368,31369,31370,31371,31372,31373,31374,31375,31376,31377,31378,31379,31380,31381,31382,31383,31384,31385,31484,31485,30102,30103,30104,30105,30106,30107,30108,30109,30110,30111,30112,30113,30114,30115,30116,30117,30118,30119,30120,30121,30122,30123,30124,30125,30126,30127,30128,30129,30130,30131,30132,30133,30134,30135,30136,30137,30138,30139,30140,30141,30142,30143,30144,30145,30146,30147,30148,30149,30150,30151,30018,30019,30020,30021,30022,30023,30024,30025,30026,30027,30028,30029,30030,30031,30032,30033,30034,30035,30036,30037,30038,30039,30040,30341,30342,30343,30344,30345,30346,30347,30348,30349,30350,30351,30352,30353,30354,30355,30356,31301,31302,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,30043,30044,30045,30046,30047,30048,30049,30050,30051,30052,30053,30054,30055,30056,30057,30058,30059,30060,30061,30062,30063,30064,30065,30066,30067,30068,30069,30070,30071,30072,30073,30074,30075,30076,30077,30078,30079,30080,30081,30082,30083,30084,30085,30086,30087,30088,30089,30090,30091,30092,30093,30094,30095,30096,30097,30098,30099,30100,30101,33896,33897,33898,33899,33901,33902,33903,33904,33905,33906,33907,33908,33909,33910,33911,33912,33913,33914,33915,33916,33917,33918,33919,33920,3579,3580,3581,3582,3583,13865,13866,13867,13868,13869,13870,13871,13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,13884,13885,13886,13887,13888,13889,13890,13891,13892,13939,13940,13941,13942,13943,13944,13945,13946,13947,13948,13949,13950,13951,13952,13953,13954,13955,13956,13957,33694,33695,33696,33697,33698,33699,33700,33701,33702,33703,33704,33705,33706,33707,33708,33709,33710,33711,33712,33713,33714,33715,33716,33717,33718,33719,33720,33721,33722,34022,34023,30333,30334,30335,30336,30337,30338,30339,30340;usergroup=60;usergroup=42;usergroup=39;usergroup=68 H 8 N N 15653 0 All - Kbeauty - Rest <p>..</p>