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 (
    4, 1, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 
    17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 
    27
  ) 
  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.00049

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "57.61"
    },
    "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": 24,
        "rows_produced_per_join": 4,
        "filtered": "19.67",
        "index_condition": "(`danishecarter_latest`.`cscart_product_prices`.`product_id` in (4,1,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27))",
        "cost_info": {
          "read_cost": "56.67",
          "eval_cost": "0.94",
          "prefix_cost": "57.61",
          "data_read_per_join": "113"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`danishecarter_latest`.`cscart_product_prices`.`lower_limit` = 1) and (`danishecarter_latest`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
1 5399.99000000
4 699.99000000
5 899.99000000
7 55.00000000
8 849.99000000
9 999.99000000
10 1199.99000000
11 30.00000000
12 30.00000000
13 11.96000000
14 499.99000000
15 150.00000000
16 349.99000000
17 11.16000000
18 299.99000000
19 79.99000000
20 19.95000000
21 29.99000000
22 799.99000000
23 599.99000000
24 449.99000000
25 599.99000000
26 34.99000000
27 55.00000000