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 (
    3884, 382, 3875, 2294, 112, 3471, 3880, 
    3877, 49265, 3859, 3879, 3881, 23162, 
    3860, 6089, 1781, 384, 3883, 385, 3882, 
    1755, 383, 4020, 1754, 4493, 41398, 
    52, 41399, 5581, 5577, 4500, 1059
  ) 
  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.00590

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 (3884,382,3875,2294,112,3471,3880,3877,49265,3859,3879,3881,23162,3860,6089,1781,384,3883,385,3882,1755,383,4020,1754,4493,41398,52,41399,5581,5577,4500,1059)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
52 175000.0000
112 145000.0000
382 170000.0000
383 109000.0000
384 99000.0000
385 109000.0000
1059 199000.0000
1754 484920.0000
1755 966000.0000
1781 999000.0000
2294 220000.0000
3471 999000.0000
3859 600000.0000
3860 600000.0000
3875 170000.0000
3877 150000.0000
3879 150000.0000
3880 150000.0000
3881 300000.0000
3882 400000.0000
3883 520000.0000
3884 520000.0000
4020 150000.0000
4493 60000.0000
4500 80000.0000
5577 1080000.0000
5581 1080000.0000
6089 610000.0000
23162 449000.0000
41398 480000.0000
41399 480000.0000
49265 350000.0000