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 (
    630, 35833, 35804, 31966, 35859, 4465, 
    4362, 33625, 5578, 5579, 5478, 5580, 
    31887, 31891, 31894, 31893, 31895, 
    4361, 5479, 4366, 4360, 5485, 31889, 
    31886, 4358, 4464, 4466, 31897, 4359, 
    5481, 31896, 4357
  ) 
  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.01136

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 (630,35833,35804,31966,35859,4465,4362,33625,5578,5579,5478,5580,31887,31891,31894,31893,31895,4361,5479,4366,4360,5485,31889,31886,4358,4464,4466,31897,4359,5481,31896,4357)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
630 550000.0000
4357 660000.0000
4358 790000.0000
4359 710000.0000
4360 810000.0000
4361 850000.0000
4362 845000.0000
4366 980000.0000
4464 660000.0000
4465 800000.0000
4466 690000.0000
5478 960000.0000
5479 960000.0000
5481 690000.0000
5485 770000.0000
5578 880000.0000
5579 780000.0000
5580 880000.0000
31886 550000.0000
31887 550000.0000
31889 550000.0000
31891 550000.0000
31893 550000.0000
31894 700000.0000
31895 700000.0000
31896 980000.0000
31897 980000.0000
31966 810000.0000
33625 550000.0000
35804 610000.0000
35833 530000.0000
35859 800000.0000