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 (
    40532, 49309, 36293, 44568, 44574, 4374, 
    45364, 36521, 44573, 4385, 45365, 40529, 
    44571, 40534, 36470, 47257, 25162, 
    47258, 47393, 44570, 24788, 40531, 
    2048, 49758
  ) 
  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.00808

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": 24,
          "filtered": 99.9960556,
          "index_condition": "cscart_product_prices.product_id in (40532,49309,36293,44568,44574,4374,45364,36521,44573,4385,45365,40529,44571,40534,36470,47257,25162,47258,47393,44570,24788,40531,2048,49758)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
2048 425000.0000
4374 215000.0000
4385 325000.0000
24788 350000.0000
25162 215000.0000
36293 250000.0000
36470 450000.0000
36521 225000.0000
40529 275000.0000
40531 385000.0000
40532 220000.0000
40534 495000.0000
44568 210000.0000
44570 235000.0000
44571 210000.0000
44573 200000.0000
44574 200000.0000
45364 391000.0000
45365 391000.0000
47257 350000.0000
47258 250000.0000
47393 379000.0000
49309 320000.0000
49758 385000.0000