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 (
    5589, 5447, 4365, 31886, 5469, 4468, 
    4358, 5464, 5474, 5962, 4464, 4364, 
    4466, 31897, 47280, 4359, 5481, 5459, 
    31896, 48032, 4357, 48322, 31892, 31890, 
    4467, 47088, 31898, 5483, 47090, 48033, 
    48030, 48037
  ) 
  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.00535

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 (5589,5447,4365,31886,5469,4468,4358,5464,5474,5962,4464,4364,4466,31897,47280,4359,5481,5459,31896,48032,4357,48322,31892,31890,4467,47088,31898,5483,47090,48033,48030,48037)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
4357 660000.0000
4358 790000.0000
4359 710000.0000
4364 1680000.0000
4365 1630000.0000
4464 660000.0000
4466 690000.0000
4467 850000.0000
4468 4150000.0000
5447 3690000.0000
5459 1930000.0000
5464 1450000.0000
5469 1390000.0000
5474 1280000.0000
5481 690000.0000
5483 660000.0000
5589 145000.0000
5962 3500000.0000
31886 550000.0000
31890 550000.0000
31892 550000.0000
31896 980000.0000
31897 980000.0000
31898 980000.0000
47088 95000.0000
47090 170000.0000
47280 290000.0000
48030 165000.0000
48032 330000.0000
48033 339000.0000
48037 330000.0000
48322 270000.0000