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 (
    27946, 3525, 3523, 2949, 3534, 1404, 
    33606, 2936, 2968, 5777, 2944, 5776, 
    32317, 2919, 3019, 2868, 37849, 1407, 
    2864, 3408, 3412, 1417, 32328, 3025, 
    1406, 32360, 3409, 19210, 27927, 35733, 
    32319, 1419
  ) 
  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.00213

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 (27946,3525,3523,2949,3534,1404,33606,2936,2968,5777,2944,5776,32317,2919,3019,2868,37849,1407,2864,3408,3412,1417,32328,3025,1406,32360,3409,19210,27927,35733,32319,1419)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
1404 317000.0000
1406 433000.0000
1407 157000.0000
1417 214000.0000
1419 205000.0000
2864 404000.0000
2868 1585000.0000
2919 254000.0000
2936 404000.0000
2944 31000.0000
2949 94000.0000
2968 62000.0000
3019 71000.0000
3025 871000.0000
3408 118000.0000
3409 57000.0000
3412 118000.0000
3523 129000.0000
3525 129000.0000
3534 32900.0000
5776 185000.0000
5777 215000.0000
19210 139000.0000
27927 129000.0000
27946 299000.0000
32317 139000.0000
32319 239000.0000
32328 259000.0000
32360 199000.0000
33606 350000.0000
35733 1500000.0000
37849 159000.0000