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 (
    5114, 5397, 5130, 5111, 5176, 5405, 5404, 
    5113, 5168, 5393, 5403, 5155, 5170, 
    5101, 5124, 5102, 5394, 5239, 5151, 
    5396, 5173, 5157, 5126, 5133
  ) 
  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.00130

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 (5114,5397,5130,5111,5176,5405,5404,5113,5168,5393,5403,5155,5170,5101,5124,5102,5394,5239,5151,5396,5173,5157,5126,5133))",
        "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
5101 10250.00000000
5102 13000.00000000
5111 7000.00000000
5113 9500.00000000
5114 6000.00000000
5124 10250.00000000
5126 53750.00000000
5130 23750.00000000
5133 32500.00000000
5151 24500.00000000
5155 48000.00000000
5157 41500.00000000
5168 37250.00000000
5170 35750.00000000
5173 30000.00000000
5176 72750.00000000
5239 180000.00000000
5393 1235000.00000000
5394 1320000.00000000
5396 945000.00000000
5397 1050000.00000000
5403 360000.00000000
5404 265000.00000000
5405 230000.00000000