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 (
    1325, 1327, 1328, 1329, 1331, 1332, 1333, 
    3687, 5071, 5073, 5074, 5075, 5077, 
    5078, 6714, 7272, 7273, 7274, 7275, 
    7276, 7277, 7347, 7348, 7349, 7350
  ) 
  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.00068

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "17.51"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "product_id",
        "used_key_parts": [
          "product_id"
        ],
        "key_length": "3",
        "rows_examined_per_scan": 25,
        "rows_produced_per_join": 4,
        "filtered": "20.00",
        "index_condition": "(`gaseus`.`cscart_product_prices`.`product_id` in (1325,1327,1328,1329,1331,1332,1333,3687,5071,5073,5074,5075,5077,5078,6714,7272,7273,7274,7275,7276,7277,7347,7348,7349,7350))",
        "cost_info": {
          "read_cost": "17.01",
          "eval_cost": "0.50",
          "prefix_cost": "17.51",
          "data_read_per_join": "119"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`gaseus`.`cscart_product_prices`.`lower_limit` = 1) and (`gaseus`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
1325 0.00000000
1327 0.00000000
1328 0.00000000
1329 0.00000000
1331 0.00000000
1332 0.00000000
1333 0.00000000
3687 0.00000000
5071 0.00000000
5073 0.00000000
5074 0.00000000
5075 0.00000000
5077 0.00000000
5078 0.00000000
6714 349.00000000
7272 0.00000000
7273 0.00000000
7274 0.00000000
7275 0.00000000
7276 0.00000000
7277 0.00000000
7347 0.00000000
7348 0.00000000
7349 0.00000000
7350 0.00000000