SELECT 
  ushop_promotions.*, 
  ushop_promotion_descriptions.name, 
  ushop_promotion_descriptions.detailed_description, 
  ushop_promotion_descriptions.short_description, 
  ushop_promotion_images.promotion_image_id 
FROM 
  ushop_promotions 
  LEFT JOIN ushop_promotion_descriptions ON ushop_promotion_descriptions.promotion_id = ushop_promotions.promotion_id 
  AND ushop_promotion_descriptions.lang_code = 'es' 
  LEFT JOIN ushop_storefronts_promotions AS storefronts_promotions ON storefronts_promotions.promotion_id = ushop_promotions.promotion_id 
  LEFT JOIN ushop_promotion_images ON ushop_promotion_images.promotion_id = ushop_promotions.promotion_id 
  AND ushop_promotion_images.lang_code = 'es' 
WHERE 
  1 
  AND status IN ('A') 
  AND (
    storefronts_promotions.storefront_id = 1 
    OR storefronts_promotions.storefront_id IS NULL
  ) 
  AND ushop_promotions.promotion_id NOT IN (25, 26, 27, 30) 
  AND 1 
ORDER BY 
  (
    IF(from_date > 1777035139, 1, 0) + IF(
      to_date 
      AND to_date < 1777035139, 
      2, 
      0
    )
  ) asc, 
  ABS(
    (
      IF(
        from_date > 1777035139, from_date, 
        to_date
      )/-1
    ) + 1777035139
  ) asc 
LIMIT 
  0, 12

Query time 0.00754

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4.56"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "1.70"
      },
      "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": "ushop_promotions",
            "access_type": "ALL",
            "possible_keys": [
              "PRIMARY"
            ],
            "rows_examined_per_scan": 17,
            "rows_produced_per_join": 1,
            "filtered": "10.00",
            "cost_info": {
              "read_cost": "2.35",
              "eval_cost": "0.17",
              "prefix_cost": "2.52",
              "data_read_per_join": "136"
            },
            "used_columns": [
              "promotion_id",
              "company_id",
              "conditions",
              "bonuses",
              "to_date",
              "from_date",
              "priority",
              "stop",
              "stop_other_rules",
              "zone",
              "conditions_hash",
              "status",
              "number_of_usages",
              "users_conditions_hash",
              "ath_show_in_cart_bar"
            ],
            "attached_condition": "((`marketplace`.`ushop_promotions`.`status` = 'A') and (`marketplace`.`ushop_promotions`.`promotion_id` not in (25,26,27,30)))"
          }
        },
        {
          "table": {
            "table_name": "ushop_promotion_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "promotion_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "marketplace.ushop_promotions.promotion_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.17",
              "prefix_cost": "2.69",
              "data_read_per_join": "3K"
            },
            "used_columns": [
              "promotion_id",
              "name",
              "short_description",
              "detailed_description",
              "lang_code"
            ]
          }
        },
        {
          "table": {
            "table_name": "ushop_promotion_images",
            "access_type": "eq_ref",
            "possible_keys": [
              "promo"
            ],
            "key": "promo",
            "used_key_parts": [
              "promotion_id",
              "lang_code"
            ],
            "key_length": "10",
            "ref": [
              "marketplace.ushop_promotions.promotion_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "index_condition": "<if>(is_not_null_compl(ushop_promotion_images), (`marketplace`.`ushop_promotion_images`.`promotion_id` = `marketplace`.`ushop_promotions`.`promotion_id`), true)",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.17",
              "prefix_cost": "2.86",
              "data_read_per_join": "27"
            },
            "used_columns": [
              "promotion_image_id",
              "promotion_id",
              "lang_code"
            ]
          }
        }
      ]
    }
  }
}

Result

promotion_id company_id conditions bonuses to_date from_date priority stop stop_other_rules zone conditions_hash status number_of_usages users_conditions_hash ath_show_in_cart_bar name detailed_description short_description promotion_image_id
29 0 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:3:"gte";s:9:"condition";s:8:"subtotal";s:5:"value";d:10;}}} a:1:{i:1;a:2:{s:5:"bonus";s:13:"free_shipping";s:5:"value";s:1:"6";}} 2014858799 1763694000 2 N N cart subtotal=10 A 107 Y EnvĂ­o gratis 13
31 0 a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:1:{i:2;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:8:"products";s:5:"value";s:19:"348,547,548,347,549";}}} 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";}} 1776321110 0 0 N N catalog products=348,547,548,347,549 A 0 N AB: Stock! Buy a promotional hair dryer VALERA - get a 40% discount on the curling iron! <p>Every buyer of a promotional hair dryer VALERA can get a 40% discount on a cooler *! To receive a gift, you need to add a VALERA promotional hairdryer and an action souplink to the cart.</p><p>The promotion is valid only, when placing an order on the site.</p><p>Hurry, the number of gifts is limited!</p><p>* 40% of the discount is given on the promotional product - promotional coupon.<br></p> <p>To receive a gift, you need to add a VALERA promotional hairdryer and an action souplink to the basket.</p><p>The promotion is valid only when placing an order on the site.<br></p> 15
32 0 a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:1:{i:2;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:8:"products";s:5:"value";s:19:"525,524,355,301,300";}}} 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:"50";}} 1776321110 0 0 N N catalog products=525,524,355,301,300 A 0 N AB: RACING CARD + 2-YEAR LICENSE FOR RACES K1 <p><span class="legal-disclosures-line1">Promotional value expires 60 days after purchase. Amount paid never expires.</span> <span class="fine-print-description">Limit 2 per person, may buy 20 additional as gifts. Must activate licenses by the expiration date. Licenses expire 1 year from activation date. All junior racers must be at least 48'' and adult racers must be at least 4'10'' tall to race. All racers should be under 7' tall and 300 lbs. Subject to availability. Not valid for group events. May split between 2 people.</span> <span class="legal-disclosures-line2">Merchant is solely responsible to purchasers for the care and quality of the advertised goods and services.</span></p> <p><span class="legal-disclosures-line2"><span class="legal-disclosures-line1">Promotional value expires 60 days after purchase. Amount paid never expires.</span> <span class="fine-print-description">Limit 2 per person, may buy 20 additional as gifts.</span></span></p> 17
33 0 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:19:"299,521,520,298,354";}}} 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:"10";}} 1776321110 0 0 N N catalog products=299,521,520,298,354 A 0 N AB: Only today you can buy a camera with - 10% discount <p>Buy a camera of a well-known brand with 10% discount during this period. </p><p>Buying promotional models of cameras or Canon lenses, you get a free one-year subscription to a plan for photographers from Adobe Creative Cloud and one of the online courses.<br></p> <p>Buy a camera of a well-known brand with 10% discount during this period. .<br> </p> 19
34 0 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:3:"gte";s:9:"condition";s:8:"subtotal";s:5:"value";d:3000;}}} a:1:{i:0;a:2:{s:5:"bonus";s:13:"free_shipping";s:5:"value";s:1:"6";}} 1776321110 0 0 N N cart subtotal=3000 A 0 N AB: Free shipping for orders over $ 50. <p>Our online store offers the best delivery terms for orders over $ 50. Take advantage of this offer right now and save on delivery, we will bring products at our own expense.</p> <p>Get exclusive shipping terms for orders over $ 50.</p> 21
35 0 a:3:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";s:10:"conditions";a:1:{i:6;a:3:{s:8:"operator";s:2:"in";s:9:"condition";s:10:"categories";s:5:"value";s:3:"348";}}} a:1:{i:2;a:4:{s:5:"bonus";s:20:"discount_on_products";s:5:"value";s:19:"317,316,318,349,315";s:14:"discount_bonus";s:13:"by_percentage";s:14:"discount_value";d:5;}} 1776321110 0 4 N N cart categories=348 A 0 N AB: 5% discount for X-Box One & Sabertooth bundle <p>Buying X-Box One & Sabertooth in a bundle, you will get a 5% discount for all order. Harry up, our offer is limited (only the first 500 purchases will receive such exclusive conditions) </p> <p>Buying X-Box One & Sabertooth in a bundle, you will get a 5% discount for all order. </p> 23
28 0 a:2:{s:3:"set";s:3:"all";s:9:"set_value";s:1:"1";} a:0:{} 1767236399 1763607600 1 N N cart A 0 N $200 <p>$200 en tu primera compra</p> <p>$200 en tu primera compra</p> 11