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 (
    50216, 41341, 41340, 47922, 47921, 41343, 
    47896, 47924, 47923, 41339, 31965, 
    1972, 36746, 2085, 2304, 5829, 41399, 
    15218, 3765, 3004, 2302, 22143, 18160, 
    4599, 2299, 47895, 3641, 2298, 3767, 
    5826, 4597, 2297
  ) 
  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.00259

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 (50216,41341,41340,47922,47921,41343,47896,47924,47923,41339,31965,1972,36746,2085,2304,5829,41399,15218,3765,3004,2302,22143,18160,4599,2299,47895,3641,2298,3767,5826,4597,2297)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
1972 405000.0000
2085 480000.0000
2297 230000.0000
2298 405000.0000
2299 275000.0000
2302 335000.0000
2304 230000.0000
3004 350000.0000
3641 260000.0000
3765 230000.0000
3767 230000.0000
4597 500000.0000
4599 460000.0000
5826 395000.0000
5829 295000.0000
15218 450000.0000
18160 320000.0000
22143 275000.0000
31965 420000.0000
36746 240000.0000
41339 310000.0000
41340 295000.0000
41341 285000.0000
41343 310000.0000
41399 480000.0000
47895 319500.0000
47896 315000.0000
47921 285000.0000
47922 320000.0000
47923 295000.0000
47924 315000.0000
50216 410000.0000