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 (
    4974, 4995, 4992, 5008, 4991, 5969, 5024, 
    5017, 5002, 4988, 5007, 5019, 5010, 
    5018, 5005, 5011, 5014, 5021, 5022, 
    5006, 4961, 5009, 5013, 4989, 5004, 
    5020, 5016, 5023, 9699
  ) 
  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.00118

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "20.31"
    },
    "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": 29,
        "rows_produced_per_join": 5,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (4974,4995,4992,5008,4991,5969,5024,5017,5002,4988,5007,5019,5010,5018,5005,5011,5014,5021,5022,5006,4961,5009,5013,4989,5004,5020,5016,5023,9699))",
        "cost_info": {
          "read_cost": "19.73",
          "eval_cost": "0.58",
          "prefix_cost": "20.31",
          "data_read_per_join": "139"
        },
        "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
4961 599250.00000000
4974 269250.00000000
4988 749250.00000000
4989 499000.00000000
4991 299250.00000000
4992 182000.00000000
4995 156750.00000000
5002 13950.00000000
5004 13950.00000000
5005 13950.00000000
5006 13950.00000000
5007 13950.00000000
5008 13950.00000000
5009 13950.00000000
5010 13950.00000000
5011 13950.00000000
5013 13950.00000000
5014 13950.00000000
5016 13950.00000000
5017 13950.00000000
5018 13950.00000000
5019 13950.00000000
5020 13950.00000000
5021 13950.00000000
5022 13950.00000000
5023 13950.00000000
5024 13950.00000000
5969 13950.00000000
9699 125000.00000000