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 (
    154479, 154480, 155225, 162940, 183314, 
    183803, 230989, 238557, 242642, 251715, 
    285163, 308210, 311257, 317943, 30150, 
    163242, 163892, 170742, 175508, 183620, 
    183941, 204777, 225113, 230958
  ) 
  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.00170

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 (154479,154480,155225,162940,183314,183803,230989,238557,242642,251715,285163,308210,311257,317943,30150,163242,163892,170742,175508,183620,183941,204777,225113,230958)) and (`unicomps`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
30150 16271.69000000
154479 613.54000000
154480 613.54000000
155225 3379.60000000
162940 1621.07000000
163242 659.79000000
163892 161.89000000
170742 750.94000000
175508 1512.30000000
183314 2962.55000000
183620 929.81000000
183803 35165.30000000
183941 659.79000000
204777 58731.20000000
225113 659.79000000
230958 920.98000000
230989 1503.36000000
238557 3015.52000000
242642 1692.58000000
251715 2265.47000000
285163 12399.61000000
308210 2251.33000000
311257 705.36000000
317943 1696.88000000