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 (
    1710, 752, 1545, 756, 759, 760, 777, 761, 
    742, 764, 765, 762, 763, 2902, 2904, 
    2401, 1992, 2422, 1994, 1995
  ) 
  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.00099

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "14.91"
    },
    "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": 22,
        "rows_produced_per_join": 4,
        "filtered": "19.88",
        "index_condition": "(`zdrowy_db`.`cscart_product_prices`.`product_id` in (1710,752,1545,756,759,760,777,761,742,764,765,762,763,2902,2904,2401,1992,2422,1994,1995))",
        "cost_info": {
          "read_cost": "14.47",
          "eval_cost": "0.44",
          "prefix_cost": "14.91",
          "data_read_per_join": "104"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`zdrowy_db`.`cscart_product_prices`.`lower_limit` = 1) and (`zdrowy_db`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
742 4.50000000
752 2.20000000
756 2.30000000
759 3.40000000
760 3.25000000
761 3.10000000
762 3.75000000
763 3.45000000
764 4.65000000
765 5.30000000
777 3.60000000
1545 2.50000000
1710 3.70000000
1992 550.00000000
1994 650.00000000
1995 750.00000000
2401 310.00000000
2422 360.00000000
2902 850.00000000
2904 850.00000000