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 (
    3978, 3977, 49256, 36307, 4381, 1050, 
    3974, 2252, 33709, 3988, 36717, 43650, 
    36297, 2249, 40535, 33824, 353, 36295, 
    33721, 34678, 2260, 36300, 40532, 40527, 
    41230, 25159, 33713, 49309, 3979, 36293, 
    18710, 33835
  ) 
  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.00335

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 (3978,3977,49256,36307,4381,1050,3974,2252,33709,3988,36717,43650,36297,2249,40535,33824,353,36295,33721,34678,2260,36300,40532,40527,41230,25159,33713,49309,3979,36293,18710,33835)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
353 5000000.0000
1050 3450000.0000
2249 2850000.0000
2252 6000000.0000
2260 15500000.0000
3974 220000.0000
3977 385000.0000
3978 825000.0000
3979 935000.0000
3988 1155000.0000
4381 475000.0000
18710 1595000.0000
25159 149000.0000
33709 100000.0000
33713 150000.0000
33721 1500000.0000
33824 80000.0000
33835 110000.0000
34678 800000.0000
36293 250000.0000
36295 250000.0000
36297 2500000.0000
36300 350000.0000
36307 1200000.0000
36717 820000.0000
40527 198000.0000
40532 220000.0000
40535 99000.0000
41230 1200000.0000
43650 950000.0000
49256 480000.0000
49309 320000.0000