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 (
    5512, 5513, 5511, 5514, 4585, 5657, 5359, 
    5360, 1160, 3172, 2958, 963, 177, 4689, 
    114, 5138, 5143, 5137, 5136, 5141, 7554, 
    7897, 4224, 6354
  ) 
  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.00094

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.12",
        "index_condition": "(`dbggbern`.`cscart_product_prices`.`product_id` in (5512,5513,5511,5514,4585,5657,5359,5360,1160,3172,2958,963,177,4689,114,5138,5143,5137,5136,5141,7554,7897,4224,6354))",
        "cost_info": {
          "read_cost": "16.35",
          "eval_cost": "0.46",
          "prefix_cost": "16.81",
          "data_read_per_join": "110"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`dbggbern`.`cscart_product_prices`.`lower_limit` = 1) and (`dbggbern`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
114 3.00000000
177 3.90000000
963 29.90000000
1160 9.90000000
2958 29.90000000
3172 4.90000000
4224 49.90000000
4585 5.90000000
4689 9.90000000
5136 12.90000000
5137 12.90000000
5138 12.90000000
5141 24.90000000
5143 24.90000000
5359 29.90000000
5360 24.90000000
5511 29.90000000
5512 29.90000000
5513 29.90000000
5514 29.90000000
5657 109.90000000
6354 19.90000000
7554 29.90000000
7897 24.90000000