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 (
    3471, 3880, 3877, 3859, 3879, 3881, 23162, 
    3860, 5455, 1781, 3883, 3882, 1755, 
    1754, 2280, 35254, 31899, 47598, 46694, 
    31900, 52, 47599, 47603, 4500, 1059, 
    1750, 35859, 1784, 1408, 1747, 5998, 
    5476
  ) 
  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.10647

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 (3471,3880,3877,3859,3879,3881,23162,3860,5455,1781,3883,3882,1755,1754,2280,35254,31899,47598,46694,31900,52,47599,47603,4500,1059,1750,35859,1784,1408,1747,5998,5476) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
52 175000.0000
1059 199000.0000
1408 305000.0000
1747 189000.0000
1750 1020600.0000
1754 484920.0000
1755 966000.0000
1781 999000.0000
1784 999000.0000
2280 1200000.0000
3471 999000.0000
3859 600000.0000
3860 600000.0000
3877 150000.0000
3879 150000.0000
3880 150000.0000
3881 300000.0000
3882 400000.0000
3883 520000.0000
4500 80000.0000
5455 3200000.0000
5476 1280000.0000
5998 620000.0000
23162 449000.0000
31899 130000.0000
31900 130000.0000
35254 995000.0000
35859 800000.0000
46694 2200000.0000
47598 605000.0000
47599 605000.0000
47603 340000.0000