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 (
    6324, 4579, 4580, 5419, 5180, 5420, 5711, 
    5714, 5866, 6033, 5157, 4749, 5636, 
    6408, 7427, 6387, 4969, 4968, 5721, 
    7641, 2626, 2627, 5784, 5782
  ) 
  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.00056

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "17.26"
    },
    "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": "19.12",
        "index_condition": "(`dbggbern`.`cscart_product_prices`.`product_id` in (6324,4579,4580,5419,5180,5420,5711,5714,5866,6033,5157,4749,5636,6408,7427,6387,4969,4968,5721,7641,2626,2627,5784,5782))",
        "cost_info": {
          "read_cost": "16.78",
          "eval_cost": "0.48",
          "prefix_cost": "17.26",
          "data_read_per_join": "114"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`dbggbern`.`cscart_product_prices`.`lower_limit` = 1) and (`dbggbern`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
2626 39.90000000
2627 19.90000000
4579 24.90000000
4580 39.90000000
4749 2.90000000
4968 29.90000000
4969 49.90000000
5157 34.90000000
5180 49.90000000
5419 59.90000000
5420 59.90000000
5636 3.90000000
5711 99.90000000
5714 79.90000000
5721 6.90000000
5782 24.90000000
5784 24.90000000
5866 19.90000000
6033 2.90000000
6324 24.90000000
6387 29.90000000
6408 34.90000000
7427 39.90000000
7641 19.90000000