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 (
    5396, 5581, 5021, 5022, 5006, 5853, 4961, 
    5009, 5318, 5558, 2890, 5208, 5449, 
    5556, 5792, 10403, 5519, 5601, 5901, 
    7772, 8266, 5763, 2888, 5241
  ) 
  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.00069

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "17.71"
    },
    "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": 26,
        "rows_produced_per_join": 5,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (5396,5581,5021,5022,5006,5853,4961,5009,5318,5558,2890,5208,5449,5556,5792,10403,5519,5601,5901,7772,8266,5763,2888,5241))",
        "cost_info": {
          "read_cost": "17.19",
          "eval_cost": "0.52",
          "prefix_cost": "17.71",
          "data_read_per_join": "124"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`lower_limit` = 1) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
2888 106000.00000000
2890 374000.00000000
4961 599250.00000000
5006 13950.00000000
5009 13950.00000000
5021 13950.00000000
5022 13950.00000000
5208 8250.00000000
5241 200000.00000000
5318 17000.00000000
5396 945000.00000000
5449 145000.00000000
5519 47250.00000000
5556 210000.00000000
5558 210000.00000000
5581 3850000.00000000
5601 236250.00000000
5763 1620000.00000000
5792 536000.00000000
5853 1552500.00000000
5901 1458000.00000000
7772 139750.00000000
8266 1080000.00000000
10403 159000.00000000