SELECT 
  ushop_product_prices.product_id, 
  MIN(
    IF(
      ushop_product_prices.percentage_discount = 0, 
      ushop_product_prices.price, 
      ushop_product_prices.price - (
        ushop_product_prices.price * ushop_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  ushop_product_prices 
WHERE 
  ushop_product_prices.product_id IN (
    517, 525, 511, 489, 516, 483, 513, 477, 
    479, 519, 509, 510, 488, 512, 478, 490, 
    503, 482, 514, 492, 507, 521, 520, 502, 
    508, 480, 515, 506, 518, 497, 505, 500, 
    495
  ) 
  AND ushop_product_prices.lower_limit = 1 
  AND ushop_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  ushop_product_prices.product_id

Query time 0.00111

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "24.91"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "ushop_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": 37,
        "rows_produced_per_join": 7,
        "filtered": "19.85",
        "index_condition": "(`marketplace`.`ushop_product_prices`.`product_id` in (517,525,511,489,516,483,513,477,479,519,509,510,488,512,478,490,503,482,514,492,507,521,520,502,508,480,515,506,518,497,505,500,495))",
        "cost_info": {
          "read_cost": "24.18",
          "eval_cost": "0.73",
          "prefix_cost": "24.91",
          "data_read_per_join": "176"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`marketplace`.`ushop_product_prices`.`lower_limit` = 1) and (`marketplace`.`ushop_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
477 14.98000000
478 17.99000000
479 29.98000000
480 26.92000000
482 34.68000000
483 34.68000000
488 109.99000000
489 89.99000000
490 299.99000000
492 295.00000000
495 699.00000000
497 459.99000000
500 2049.00000000
502 499.99000000
503 479.99000000
505 269.99000000
506 349.99000000
507 299.99000000
508 125.00000000
509 99.00000000
510 79.95000000
511 47.99000000
512 59.99000000
513 79.99000000
514 299.99000000
515 299.99000000
516 499.99000000
517 509.99000000
518 499.00000000
519 499.00000000
520 249.00000000
521 249.00000000
525 329.49000000