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 (
    40754, 2086, 31734, 926, 2149, 1993, 
    1266, 2440, 798, 26856, 5238, 37302, 
    41418, 37284, 26851, 45573, 41368, 
    1542, 41124, 3464, 4865, 2300, 4789, 
    32360, 38141, 41387, 40807, 3982, 2003, 
    1669, 6647, 26857
  ) 
  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.07159

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 (40754,2086,31734,926,2149,1993,1266,2440,798,26856,5238,37302,41418,37284,26851,45573,41368,1542,41124,3464,4865,2300,4789,32360,38141,41387,40807,3982,2003,1669,6647,26857) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
798 540000.0000
926 50000.0000
1266 170000.0000
1542 145000.0000
1669 500000.0000
1993 160000.0000
2003 180000.0000
2086 528000.0000
2149 200000.0000
2300 555000.0000
2440 214500.0000
3464 450000.0000
3982 495000.0000
4789 350000.0000
4865 395000.0000
5238 150000.0000
6647 696000.0000
26851 152000.0000
26856 365000.0000
26857 88000.0000
31734 1285000.0000
32360 199000.0000
37284 207000.0000
37302 248000.0000
38141 260000.0000
40754 140400.0000
40807 41000.0000
41124 499000.0000
41368 207000.0000
41387 275000.0000
41418 900000.0000
45573 45000.0000