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 (
    5677, 6869, 7504, 7819, 8022, 2837, 4593, 
    5004, 5517, 5582, 6036, 7803, 7824, 
    8055, 11212, 11557, 3937, 3035, 3220, 
    3410, 3561, 3963, 3984, 3986
  ) 
  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.00195

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "19.06"
    },
    "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 (5677,6869,7504,7819,8022,2837,4593,5004,5517,5582,6036,7803,7824,8055,11212,11557,3937,3035,3220,3410,3561,3963,3984,3986))",
        "cost_info": {
          "read_cost": "18.48",
          "eval_cost": "0.58",
          "prefix_cost": "19.06",
          "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
2837 599000.00000000
3035 236000.00000000
3220 12000.00000000
3410 107000.00000000
3561 3425000.00000000
3937 28000.00000000
3963 162000.00000000
3984 2510000.00000000
3986 21000.00000000
4593 120000.00000000
5004 13950.00000000
5517 87000.00000000
5582 3850000.00000000
5677 30000.00000000
6036 69000.00000000
6869 40000.00000000
7504 239750.00000000
7803 54500.00000000
7819 74000.00000000
7824 29750.00000000
8022 192000.00000000
8055 322000.00000000
11212 709500.00000000
11557 289500.00000000