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 (
    2803, 3568, 5715, 5716, 17265, 3868, 
    41340, 3567, 3869, 5717, 5990, 47655, 
    27359, 5789, 34555, 47922, 47921, 41343, 
    47896, 47924, 31638, 3870, 114, 47923, 
    1582, 33312, 31633, 31632, 3287, 3286, 
    3872, 113
  ) 
  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.00342

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 (2803,3568,5715,5716,17265,3868,41340,3567,3869,5717,5990,47655,27359,5789,34555,47922,47921,41343,47896,47924,31638,3870,114,47923,1582,33312,31633,31632,3287,3286,3872,113)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
113 160000.0000
114 140000.0000
1582 55000.0000
2803 815000.0000
3286 3500000.0000
3287 3500000.0000
3567 129000.0000
3568 129000.0000
3868 170000.0000
3869 420000.0000
3870 190000.0000
3872 1200000.0000
5715 140000.0000
5716 140000.0000
5717 140000.0000
5789 856900.0000
5990 79000.0000
17265 206000.0000
27359 430000.0000
31632 55000.0000
31633 135000.0000
31638 135000.0000
33312 535000.0000
34555 40000.0000
41340 295000.0000
41343 310000.0000
47655 575000.0000
47896 315000.0000
47921 285000.0000
47922 320000.0000
47923 295000.0000
47924 315000.0000