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 (
    4176, 4357, 4287, 4612, 4187, 4639, 4210, 
    4265, 4598, 4503, 4613, 4504, 4635, 
    4466, 4160, 4164, 4335, 4553, 4592, 
    4600, 4340, 4180, 4344, 4591, 4282, 
    4461, 4590, 4178, 4501, 4302, 4616, 
    4296, 4352, 4283, 4353
  ) 
  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.00150

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "24.51"
    },
    "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": 35,
        "rows_produced_per_join": 6,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (4176,4357,4287,4612,4187,4639,4210,4265,4598,4503,4613,4504,4635,4466,4160,4164,4335,4553,4592,4600,4340,4180,4344,4591,4282,4461,4590,4178,4501,4302,4616,4296,4352,4283,4353))",
        "cost_info": {
          "read_cost": "23.81",
          "eval_cost": "0.70",
          "prefix_cost": "24.51",
          "data_read_per_join": "167"
        },
        "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
4160 123000.00000000
4164 145000.00000000
4176 83000.00000000
4178 119000.00000000
4180 78000.00000000
4187 30000.00000000
4210 55000.00000000
4265 98000.00000000
4282 105000.00000000
4283 37000.00000000
4287 72000.00000000
4296 115000.00000000
4302 69000.00000000
4335 58000.00000000
4340 435000.00000000
4344 95000.00000000
4352 50000.00000000
4353 65000.00000000
4357 188000.00000000
4461 150000.00000000
4466 122000.00000000
4501 190000.00000000
4503 165000.00000000
4504 170000.00000000
4553 178000.00000000
4590 200000.00000000
4591 115000.00000000
4592 240000.00000000
4598 500000.00000000
4600 485000.00000000
4612 490000.00000000
4613 260000.00000000
4616 570000.00000000
4635 215000.00000000
4639 465000.00000000