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 (
    328055, 163893, 178330, 180437, 204532, 
    219115, 225101, 279058, 294256, 317506, 
    317925, 317927, 317954, 317957, 325706, 
    326901, 19570, 31825, 31826, 154780, 
    161165, 177148, 178072, 178114
  ) 
  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.00174

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 (328055,163893,178330,180437,204532,219115,225101,279058,294256,317506,317925,317927,317954,317957,325706,326901,19570,31825,31826,154780,161165,177148,178072,178114)) and (`unicomps`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
19570 9140.14000000
31825 5201.93000000
31826 5214.83000000
154780 4605.08000000
161165 1591.20000000
163893 180.25000000
177148 202.75000000
178072 501.98000000
178114 4615.04000000
178330 5332.00000000
180437 1200.00000000
204532 2784.87000000
219115 1212.00000000
225101 4124.02000000
279058 5665.25000000
294256 6017.85000000
317506 559.80000000
317925 1850.96000000
317927 1850.96000000
317954 1962.81000000
317957 2328.06000000
325706 19441.19000000
326901 1524.38000000
328055 2568.68000000