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 (
    255937, 261905, 285197, 295199, 308276, 
    175507, 183486, 210887, 219447, 230988, 
    238401, 258620, 291797, 295645, 308206, 
    308208, 308216, 308235, 308270, 308296, 
    311250, 321986, 31811, 68070
  ) 
  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.00179

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 (255937,261905,285197,295199,308276,175507,183486,210887,219447,230988,238401,258620,291797,295645,308206,308208,308216,308235,308270,308296,311250,321986,31811,68070)) and (`unicomps`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
31811 11812.10000000
68070 53765.25000000
175507 1485.48000000
183486 34277.05000000
210887 1770.06000000
219447 37693.15000000
230988 1503.36000000
238401 16736.48000000
255937 1545.79000000
258620 1048.08000000
261905 1572.64000000
285197 6676.99000000
291797 14665.05000000
295199 14660.63000000
295645 300.00000000
308206 1118.24000000
308208 2405.53000000
308216 1138.10000000
308235 1106.00000000
308270 3435.59000000
308276 3242.73000000
308296 594.58000000
311250 1763.64000000
321986 8001.10000000