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 (
    1061, 38129, 41407, 1174, 1062, 5578, 
    5759, 1745, 3639, 5636, 2295, 5579, 
    23481, 6660, 16847, 49018, 5478, 3768, 
    48847, 2083, 5405, 4595, 5580, 3989, 
    1768, 40309, 4597, 47652, 2086, 5770, 
    41418, 798
  ) 
  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.00626

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 (1061,38129,41407,1174,1062,5578,5759,1745,3639,5636,2295,5579,23481,6660,16847,49018,5478,3768,48847,2083,5405,4595,5580,3989,1768,40309,4597,47652,2086,5770,41418,798)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
798 540000.0000
1061 549000.0000
1062 749000.0000
1174 800000.0000
1745 571320.0000
1768 500000.0000
2083 520000.0000
2086 528000.0000
2295 555000.0000
3639 610000.0000
3768 630000.0000
3989 605000.0000
4595 610000.0000
4597 500000.0000
5405 850000.0000
5478 960000.0000
5578 880000.0000
5579 780000.0000
5580 880000.0000
5636 700000.0000
5759 700000.0000
5770 744800.0000
6660 675000.0000
16847 615000.0000
23481 800000.0000
38129 850000.0000
40309 580000.0000
41407 580000.0000
41418 900000.0000
47652 645000.0000
48847 540000.0000
49018 890000.0000