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 (
    388667, 388724, 390315, 388825, 390230, 
    389353, 389570, 415522, 388707, 389545, 
    388757, 389180, 389076, 415471, 389864, 
    415713, 389469, 388829, 388841, 388805, 
    389133, 389090, 389565, 389438, 389016, 
    389478, 388733, 389032, 388804, 388918, 
    388855, 435229, 389517, 390280, 388849, 
    389592, 388928, 388417, 389176, 388883, 
    389526, 391774, 388960, 389343, 435233, 
    388751, 389185, 389129, 389293, 389070, 
    388793, 388910, 389106, 388721, 415658, 
    389092, 389233, 389568, 388719, 388750, 
    389197, 390155, 390248, 388709, 389299, 
    388764, 388771, 389595, 390130, 415391, 
    415607, 389344, 415612, 388741, 390165, 
    388908, 388528, 389332, 415510, 388493, 
    389135, 388848, 388917, 388860, 389037, 
    390317, 388549, 389140, 389210, 389012, 
    389134, 415627, 390138, 389007, 388587, 
    388951, 388534, 388808, 415502, 388902
  ) 
  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.00234

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "280.31"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "usergroup",
        "used_key_parts": [
          "product_id",
          "usergroup_id",
          "lower_limit"
        ],
        "key_length": "9",
        "rows_examined_per_scan": 200,
        "rows_produced_per_join": 200,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "240.31",
          "eval_cost": "40.00",
          "prefix_cost": "280.31",
          "data_read_per_join": "12K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`webmarco`.`cscart_product_prices`.`lower_limit` = 1) and (`webmarco`.`cscart_product_prices`.`product_id` in (388667,388724,390315,388825,390230,389353,389570,415522,388707,389545,388757,389180,389076,415471,389864,415713,389469,388829,388841,388805,389133,389090,389565,389438,389016,389478,388733,389032,388804,388918,388855,435229,389517,390280,388849,389592,388928,388417,389176,388883,389526,391774,388960,389343,435233,388751,389185,389129,389293,389070,388793,388910,389106,388721,415658,389092,389233,389568,388719,388750,389197,390155,390248,388709,389299,388764,388771,389595,390130,415391,415607,389344,415612,388741,390165,388908,388528,389332,415510,388493,389135,388848,388917,388860,389037,390317,388549,389140,389210,389012,389134,415627,390138,389007,388587,388951,388534,388808,415502,388902)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
388417 61.52000000
388493 91.62000000
388528 75.52000000
388534 68.10000000
388549 113.90000000
388587 157.24000000
388667 184.48000000
388707 92.86000000
388709 66.86000000
388719 112.67000000
388721 85.43000000
388724 112.67000000
388733 123.81000000
388741 130.00000000
388750 136.19000000
388751 128.76000000
388757 130.00000000
388764 132.48000000
388771 212.95000000
388793 203.05000000
388804 232.76000000
388805 178.29000000
388808 184.48000000
388825 125.05000000
388829 219.14000000
388841 190.67000000
388848 188.19000000
388849 408.57000000
388855 185.71000000
388860 315.71000000
388883 356.57000000
388902 195.62000000
388908 191.90000000
388910 185.71000000
388917 338.00000000
388918 361.52000000
388928 394.95000000
388951 276.10000000
388960 335.52000000
389007 859.10000000
389012 40.86000000
389016 40.86000000
389032 47.05000000
389037 58.19000000
389070 60.67000000
389076 53.24000000
389090 76.76000000
389092 111.43000000
389106 87.90000000
389129 142.38000000
389133 96.57000000
389134 126.29000000
389135 137.43000000
389140 120.10000000
389176 146.10000000
389180 170.86000000
389185 74.67000000
389197 131.05000000
389210 154.00000000
389233 121.00000000
389293 396.00000000
389299 484.00000000
389332 330.00000000
389343 517.00000000
389344 530.00000000
389353 528.00000000
389438 121.00000000
389469 66.95000000
389478 79.62000000
389517 162.86000000
389526 176.00000000
389545 170.00000000
389565 137.52000000
389568 56.10000000
389570 55.00000000
389592 164.67000000
389595 103.14000000
389864 231.00000000
390130 56.38000000
390138 132.10000000
390155 74.19000000
390165 95.00000000
390230 187.00000000
390248 297.00000000
390280 291.50000000
390315 170.50000000
390317 176.00000000
391774 102.10000000
415391 825.00000000
415471 115.81000000
415502 152.00000000
415510 76.19000000
415522 181.33000000
415607 291.50000000
415612 137.52000000
415627 130.29000000
415658 3200.00000000
415713 346.67000000
435229 508.00000000
435233 112.76000000