SELECT 
  product_prices.product_id, 
  MIN(
    IF(
      product_prices.percentage_discount = 0, 
      product_prices.price, 
      product_prices.price - (
        product_prices.price * product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  product_prices 
WHERE 
  product_prices.product_id IN (
    386760, 388079, 388082, 388837, 388842, 
    390717, 392041, 394115, 394121, 395439, 
    396001, 396758, 401276, 402599, 404675, 
    404681, 405995, 405998, 406000, 407883, 
    409961, 411277, 413159, 413916
  ) 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  product_prices.product_id

Query time 0.00123

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "33.00"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "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": 48,
        "rows_produced_per_join": 4,
        "filtered": "10.00",
        "index_condition": "(`goimagine`.`product_prices`.`product_id` in (386760,388079,388082,388837,388842,390717,392041,394115,394121,395439,396001,396758,401276,402599,404675,404681,405995,405998,406000,407883,409961,411277,413159,413916))",
        "cost_info": {
          "read_cost": "32.53",
          "eval_cost": "0.48",
          "prefix_cost": "33.01",
          "data_read_per_join": "115"
        },
        "used_columns": [
          "id",
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`goimagine`.`product_prices`.`lower_limit` = 1) and (`goimagine`.`product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
386760 17.99000000
388079 17.99000000
388082 17.99000000
388837 17.99000000
388842 17.99000000
390717 17.99000000
392041 17.99000000
394115 17.99000000
394121 17.99000000
395439 17.99000000
396001 17.99000000
396758 17.99000000
401276 17.99000000
402599 17.99000000
404675 17.99000000
404681 17.99000000
405995 17.99000000
405998 17.99000000
406000 17.99000000
407883 17.99000000
409961 17.99000000
411277 17.99000000
413159 17.99000000
413916 17.99000000