SELECT 
  cscart_product_prices.product_id, 
  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 
WHERE 
  cscart_product_prices.product_id IN (
    1040, 2086, 36476, 3981, 5800, 4433, 
    36469, 3982, 4383, 979, 978, 5635, 5381, 
    36466, 2259, 15235, 4003, 6519, 5799, 
    2248, 5420, 41445, 40725, 3996, 3237, 
    36303, 38151, 2256, 35193, 982, 4384, 
    36302
  ) 
  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.00700

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_product_prices",
          "access_type": "range",
          "possible_keys": [
            "usergroup",
            "product_id",
            "lower_limit",
            "usergroup_id"
          ],
          "key": "product_id",
          "key_length": "3",
          "used_key_parts": ["product_id"],
          "rows": 32,
          "filtered": 99.9960556,
          "index_condition": "cscart_product_prices.product_id in (1040,2086,36476,3981,5800,4433,36469,3982,4383,979,978,5635,5381,36466,2259,15235,4003,6519,5799,2248,5420,41445,40725,3996,3237,36303,38151,2256,35193,982,4384,36302)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
978 175000.0000
979 175000.0000
982 175000.0000
1040 400000.0000
2086 528000.0000
2248 6000000.0000
2256 21800000.0000
2259 21800000.0000
3237 149000.0000
3981 308000.0000
3982 495000.0000
3996 1595000.0000
4003 1595000.0000
4383 375000.0000
4384 375000.0000
4433 650000.0000
5381 325000.0000
5420 485000.0000
5635 850000.0000
5799 149000.0000
5800 149000.0000
6519 625000.0000
15235 135000.0000
35193 290000.0000
36302 190000.0000
36303 250000.0000
36466 2420000.0000
36469 820000.0000
36476 680000.0000
38151 160000.0000
40725 220000.0000
41445 9839000.0000