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 (
    5777, 5472, 2565, 6579, 28442, 19274, 
    5441, 2944, 5462, 5776, 3200, 3667, 
    47592, 3830, 2495, 2919, 3621, 475, 
    4347, 4344, 3019, 31923, 2298, 2498, 
    5478, 28438, 4719, 2868, 3853, 38122, 
    2456, 37849
  ) 
  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.11888

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "cscart_product_prices.product_id",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "cscart_product_prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "lower_limit",
              "key_length": "3",
              "used_key_parts": ["lower_limit"],
              "ref": ["const"],
              "rows": 25327,
              "filtered": 8.080804825,
              "attached_condition": "cscart_product_prices.lower_limit <=> 1 and cscart_product_prices.product_id in (5777,5472,2565,6579,28442,19274,5441,2944,5462,5776,3200,3667,47592,3830,2495,2919,3621,475,4347,4344,3019,31923,2298,2498,5478,28438,4719,2868,3853,38122,2456,37849) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
475 139000.0000
2298 405000.0000
2456 82500.0000
2495 395000.0000
2498 195000.0000
2565 400000.0000
2868 1585000.0000
2919 254000.0000
2944 31000.0000
3019 71000.0000
3200 220000.0000
3621 65000.0000
3667 350000.0000
3830 104500.0000
3853 251900.0000
4344 150000.0000
4347 165000.0000
4719 200000.0000
5441 135000.0000
5462 1390000.0000
5472 1390000.0000
5478 960000.0000
5776 185000.0000
5777 215000.0000
6579 65000.0000
19274 90090.0000
28438 165000.0000
28442 265000.0000
31923 180000.0000
37849 159000.0000
38122 250000.0000
47592 484000.0000