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 (
    3988, 36717, 2249, 3986, 1471, 36297, 
    43650, 46273, 40535, 43655, 31879, 
    36468, 353, 6518, 36295, 4369, 41438, 
    4377, 33721, 3997, 48805, 4375, 40912, 
    5727, 2260, 6474, 34678, 33709, 44273, 
    5792, 40532, 3999
  ) 
  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.08755

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "cscart_product_prices.product_id",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "cscart_product_prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "lower_limit",
              "key_length": "3",
              "used_key_parts": ["lower_limit"],
              "ref": ["const"],
              "rows": 25327,
              "filtered": 8.333330154,
              "attached_condition": "cscart_product_prices.lower_limit <=> 1 and cscart_product_prices.product_id in (3988,36717,2249,3986,1471,36297,43650,46273,40535,43655,31879,36468,353,6518,36295,4369,41438,4377,33721,3997,48805,4375,40912,5727,2260,6474,34678,33709,44273,5792,40532,3999) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
353 5000000.0000
1471 195000.0000
2249 2850000.0000
2260 15500000.0000
3986 495000.0000
3988 1155000.0000
3997 1595000.0000
3999 2695000.0000
4369 650000.0000
4375 1550000.0000
4377 1500000.0000
5727 320000.0000
5792 149000.0000
6474 320000.0000
6518 595000.0000
31879 1000000.0000
33709 100000.0000
33721 1500000.0000
34678 800000.0000
36295 250000.0000
36297 2500000.0000
36468 520000.0000
36717 820000.0000
40532 220000.0000
40535 99000.0000
40912 280000.0000
41438 4079000.0000
43650 950000.0000
43655 165000.0000
44273 1500000.0000
46273 590000.0000
48805 90000.0000