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 (
    325721, 21545, 18228, 163607, 164330, 
    169528, 175066, 184043, 191208, 216438, 
    263004, 279659, 295751, 307166, 308366, 
    315969, 315971, 317489, 317495, 317523, 
    317945, 321995, 321998, 324572
  ) 
  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.00177

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "21.63"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "usergroup",
        "used_key_parts": [
          "product_id",
          "usergroup_id",
          "lower_limit"
        ],
        "key_length": "9",
        "rows_examined_per_scan": 48,
        "rows_produced_per_join": 48,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "16.83",
          "eval_cost": "4.80",
          "prefix_cost": "21.63",
          "data_read_per_join": "1K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`unicomps`.`cscart_product_prices`.`lower_limit` = 1) and (`unicomps`.`cscart_product_prices`.`product_id` in (325721,21545,18228,163607,164330,169528,175066,184043,191208,216438,263004,279659,295751,307166,308366,315969,315971,317489,317495,317523,317945,321995,321998,324572)) and (`unicomps`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
18228 6641.69000000
21545 8660.42000000
163607 602.65000000
164330 7508.45000000
169528 1606.80000000
175066 32604.00000000
184043 8960.60000000
191208 610.82000000
216438 2851.83000000
263004 3856.03000000
279659 7530.26000000
295751 508.96000000
307166 17785.50000000
308366 2328.06000000
315969 4475.68000000
315971 595.85000000
317489 1048.18000000
317495 1616.87000000
317523 1740.26000000
317945 773.86000000
321995 17781.79000000
321998 23068.72000000
324572 844.56000000
325721 11180.00000000