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 (
    5272, 4991, 5932, 2354, 4226, 3346, 4431, 
    5276, 4275, 4195, 3493, 3342, 1566, 
    4460, 5613, 5925, 5285, 5346, 5196, 
    1631, 3597, 5670, 3938, 3345
  ) 
  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.00095

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "16.81"
    },
    "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.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (5272,4991,5932,2354,4226,3346,4431,5276,4275,4195,3493,3342,1566,4460,5613,5925,5285,5346,5196,1631,3597,5670,3938,3345))",
        "cost_info": {
          "read_cost": "16.33",
          "eval_cost": "0.48",
          "prefix_cost": "16.81",
          "data_read_per_join": "115"
        },
        "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
1566 529000.00000000
1631 1500000.00000000
2354 24000.00000000
3342 280000.00000000
3345 210000.00000000
3346 260000.00000000
3493 7000.00000000
3597 61000.00000000
3938 66000.00000000
4195 42000.00000000
4226 60000.00000000
4275 120000.00000000
4431 204000.00000000
4460 306000.00000000
4991 299250.00000000
5196 414000.00000000
5272 8000.00000000
5276 8000.00000000
5285 8000.00000000
5346 735000.00000000
5613 435000.00000000
5670 12000.00000000
5925 432000.00000000
5932 180000.00000000