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, 3866, 3867, 3568, 3868, 3567, 3869, 
    3870, 3872, 3517, 3516, 3518, 3871, 
    3570, 3569, 3876, 37850, 3577, 1400, 
    3862, 3519, 1401, 3863, 1409, 3578, 
    3864, 3861, 35731, 23261, 1399, 632, 
    3021
  ) 
  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.00195

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,3866,3867,3568,3868,3567,3869,3870,3872,3517,3516,3518,3871,3570,3569,3876,37850,3577,1400,3862,3519,1401,3863,1409,3578,3864,3861,35731,23261,1399,632,3021)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
630 550000.0000
632 32500.0000
1399 246000.0000
1400 328000.0000
1401 1144000.0000
1409 224000.0000
3021 1050000.0000
3516 169000.0000
3517 169000.0000
3518 169000.0000
3519 169000.0000
3567 129000.0000
3568 129000.0000
3569 129000.0000
3570 129000.0000
3577 119000.0000
3578 119000.0000
3861 600000.0000
3862 550000.0000
3863 550000.0000
3864 370000.0000
3866 170000.0000
3867 170000.0000
3868 170000.0000
3869 420000.0000
3870 190000.0000
3871 490000.0000
3872 1200000.0000
3876 170000.0000
23261 1114000.0000
35731 2000000.0000
37850 79000.0000