SELECT 
  cscart_product_prices.product_id, 
  COALESCE(
    cscart_master_products_storefront_min_price.price, 
    MIN(
      IF(
        cscart_product_prices.percentage_discount = 0, 
        cscart_product_prices.price, 
        cscart_product_prices.price - (
          cscart_product_prices.price * cscart_product_prices.percentage_discount
        )/ 100
      )
    )
  ) AS price 
FROM 
  cscart_product_prices 
  LEFT JOIN cscart_master_products_storefront_min_price ON cscart_master_products_storefront_min_price.product_id = cscart_product_prices.product_id 
  AND cscart_master_products_storefront_min_price.storefront_id = 1 
WHERE 
  cscart_product_prices.product_id IN (
    143574, 154235, 157361, 133193, 132858, 
    132112, 121316, 166649, 161383, 156616, 
    169021, 155568, 129545, 143889, 157865, 
    158465, 119733, 157747, 135156, 141356, 
    170940, 153217, 141168, 139111, 152784, 
    127480, 165385, 161916, 175582, 151286, 
    118370, 131161
  ) 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  cscart_product_prices.product_id

Query time 0.01265

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.13249358,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_product_prices",
          "access_type": "range",
          "possible_keys": [
            "usergroup",
            "product_id",
            "lower_limit",
            "usergroup_id",
            "wdbi_product_id_lower_limit_usergroup_id_price_eff1727beeef",
            "wdbi_usergroup_id_lower_limit_product_id_92b7e8f6a250",
            "wdbi_product_id_lower_limit_usergroup_id_price_perc_3b2301d551d0",
            "wdbi_lower_limit_usergroup_id_product_id_b93629431718"
          ],
          "key": "usergroup",
          "key_length": "9",
          "used_key_parts": ["product_id", "usergroup_id", "lower_limit"],
          "loops": 1,
          "rows": 64,
          "cost": 0.11207368,
          "filtered": 20,
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.product_id in (143574,154235,157361,133193,132858,132112,121316,166649,161383,156616,169021,155568,129545,143889,157865,158465,119733,157747,135156,141356,170940,153217,141168,139111,152784,127480,165385,161916,175582,151286,118370,131161) and cscart_product_prices.usergroup_id in (0,1)"
        }
      },
      {
        "table": {
          "table_name": "cscart_master_products_storefront_min_price",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "8",
          "used_key_parts": ["product_id", "storefront_id"],
          "ref": [
            "u985510652_ecartify_abhi.cscart_product_prices.product_id",
            "const"
          ],
          "loops": 12.8,
          "rows": 1,
          "cost": 0.012268032,
          "filtered": 100,
          "attached_condition": "trigcond(cscart_master_products_storefront_min_price.product_id = cscart_product_prices.product_id)"
        }
      }
    ]
  }
}

Result

product_id price
118370 383.85000000
119733 196.88000000
121316 732.86000000
127480 1345.48000000
129545 261.25000000
131161 292.62000000
132112 1313.02000000
132858 330.14000000
133193 842.15000000
135156 1197.26000000
139111 1837.55000000
141168 170.44000000
141356 1984.77000000
143574 844.43000000
143889 1878.62000000
151286 170.42000000
152784 597.84000000
153217 380.72000000
154235 88.95000000
155568 1780.29000000
156616 65.41000000
157361 1573.06000000
157747 728.25000000
157865 558.59000000
158465 261.52000000
161383 1082.46000000
161916 1726.91000000
165385 1112.36000000
166649 1531.00000000
169021 333.23000000
170940 1903.39000000
175582 580.61000000