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 (
    4459, 38145, 2280, 31652, 3620, 35254, 
    41422, 31899, 330, 20932, 3382, 6529, 
    3601, 5205, 82, 37847, 2253, 41443, 
    1053, 3617, 47598, 33757, 211, 3374, 
    3183, 31900, 25730, 41436, 31651, 6558, 
    5815, 31786
  ) 
  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.00499

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 (4459,38145,2280,31652,3620,35254,41422,31899,330,20932,3382,6529,3601,5205,82,37847,2253,41443,1053,3617,47598,33757,211,3374,3183,31900,25730,41436,31651,6558,5815,31786)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
82 99000.0000
211 87000.0000
330 99000.0000
1053 3450000.0000
2253 21800000.0000
2280 1200000.0000
3183 55000.0000
3374 85000.0000
3382 90000.0000
3601 340000.0000
3617 250000.0000
3620 550000.0000
4459 198000.0000
5205 150000.0000
5815 106000.0000
6529 280000.0000
6558 590000.0000
20932 750000.0000
25730 140400.0000
31651 450000.0000
31652 300000.0000
31786 490000.0000
31899 130000.0000
31900 130000.0000
33757 135000.0000
35254 995000.0000
37847 159000.0000
38145 420000.0000
41422 1095000.0000
41436 3749000.0000
41443 6399000.0000
47598 605000.0000