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 (
    47984, 36329, 3884, 5411, 40761, 41421, 
    40452, 38558, 1123, 6211, 3471, 3781, 
    39613, 40454, 47660, 40453, 3859, 3789, 
    2917, 2906, 3860, 6089, 14965, 6562, 
    1781, 3883, 48770, 48843, 775, 1755, 
    6212, 3620
  ) 
  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.00297

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 (47984,36329,3884,5411,40761,41421,40452,38558,1123,6211,3471,3781,39613,40454,47660,40453,3859,3789,2917,2906,3860,6089,14965,6562,1781,3883,48770,48843,775,1755,6212,3620)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
775 820000.0000
1123 538000.0000
1755 966000.0000
1781 999000.0000
2906 715000.0000
2917 525000.0000
3471 999000.0000
3620 550000.0000
3781 615000.0000
3789 615000.0000
3859 600000.0000
3860 600000.0000
3883 520000.0000
3884 520000.0000
5411 515000.0000
6089 610000.0000
6211 535000.0000
6212 550000.0000
6562 510000.0000
14965 550000.0000
36329 550000.0000
38558 528000.0000
39613 590000.0000
40452 590000.0000
40453 590000.0000
40454 590000.0000
40761 775000.0000
41421 610000.0000
47660 880000.0000
47984 600000.0000
48770 690000.0000
48843 540000.0000