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 (
    238400, 238518, 258627, 279059, 322596, 
    10101, 141331, 182500, 183418, 210394, 
    216091, 216439, 244556, 285152, 304053, 
    311249, 326960, 154729, 163659, 183540, 
    200612, 255788, 255803, 274116
  ) 
  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.00199

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 (238400,238518,258627,279059,322596,10101,141331,182500,183418,210394,216091,216439,244556,285152,304053,311249,326960,154729,163659,183540,200612,255788,255803,274116)) and (`unicomps`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
10101 9889.27000000
141331 775.42000000
154729 2141.49000000
163659 721.69000000
182500 18080.51000000
183418 10960.61000000
183540 654.35000000
200612 2910.72000000
210394 49494.88000000
216091 43108.44000000
216439 2851.83000000
238400 22280.55000000
238518 32409.63000000
244556 9834.77000000
255788 871.50000000
255803 432.00000000
258627 7545.34000000
274116 6508.63000000
279059 32326.03000000
285152 1088.99000000
304053 10867.48000000
311249 1667.00000000
322596 31702.18000000
326960 5110.53000000