SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_sum_products_amount 
WHERE 
  1 
  AND product_id IN (
    128, 51118, 51117, 51116, 51115, 51114, 
    51113, 51165, 51164, 51163, 51162, 
    51161, 52, 51183, 20, 51188, 51187, 
    51186, 51185, 51184, 51194, 51193, 
    51192, 51191, 51190, 51189, 19, 51201, 
    51200, 51199, 51198, 51197, 51196, 
    51195, 131, 111, 51212, 144, 51215, 
    51214, 51213, 51444, 51445, 51446, 
    51447, 51220, 51219, 51218, 51217, 
    51216, 146, 51448, 51449, 51231, 51230, 
    51229, 51228, 51227, 51226, 51225, 
    109, 51243, 51242, 51241, 51240, 51239, 
    36, 51253, 51252, 51251, 51250, 51249, 
    34, 51273, 147, 51277, 51276, 51275, 
    51274, 9, 59, 60, 13, 51346, 118, 114, 
    84, 51347, 85, 61, 51350, 123, 15, 95, 
    51352, 51351, 96, 89, 51390, 51391, 
    51392, 51393, 51394
  )

Query time 0.00134

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "117.11"
    },
    "table": {
      "table_name": "cscart_warehouses_sum_products_amount",
      "access_type": "range",
      "possible_keys": [
        "PRIMARY"
      ],
      "key": "PRIMARY",
      "used_key_parts": [
        "product_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 203,
      "rows_produced_per_join": 203,
      "filtered": "100.00",
      "index_condition": "(`test_uchur_k`.`cscart_warehouses_sum_products_amount`.`product_id` in (128,51118,51117,51116,51115,51114,51113,51165,51164,51163,51162,51161,52,51183,20,51188,51187,51186,51185,51184,51194,51193,51192,51191,51190,51189,19,51201,51200,51199,51198,51197,51196,51195,131,111,51212,144,51215,51214,51213,51444,51445,51446,51447,51220,51219,51218,51217,51216,146,51448,51449,51231,51230,51229,51228,51227,51226,51225,109,51243,51242,51241,51240,51239,36,51253,51252,51251,51250,51249,34,51273,147,51277,51276,51275,51274,9,59,60,13,51346,118,114,84,51347,85,61,51350,123,15,95,51352,51351,96,89,51390,51391,51392,51393,51394))",
      "cost_info": {
        "read_cost": "96.81",
        "eval_cost": "20.30",
        "prefix_cost": "117.11",
        "data_read_per_join": "3K"
      },
      "used_columns": [
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
9 36
9 36
13 20
13 20
15 31
15 31
19 3
19 3
20 2
20 2
34 3
34 3
36 3
36 3
52 2
52 2
59 14
59 14
60 29
60 29
61 12
61 12
84 18
84 18
85 70
85 70
89 8
89 8
95 13
95 13
96 4
96 4
109 3
109 3
111 1
111 1
114 25
114 25
118 20
118 20
123 21
123 21
128 3
128 3
131 2
131 2
144 4
144 4
146 4
146 4
147 2
147 2
51113 2
51113 2
51114 2
51114 2
51115 3
51115 3
51116 2
51116 2
51117 2
51117 2
51118 1
51118 1
51161 2
51161 2
51162 3
51162 3
51163 1
51163 1
51164 1
51164 1
51165 1
51165 1
51183 1
51183 1
51184 3
51184 3
51185 5
51185 5
51186 4
51186 4
51187 2
51187 2
51188 2
51188 2
51189 3
51189 3
51190 6
51190 6
51191 6
51191 6
51192 6
51192 6
51193 3
51193 3
51194 2
51194 2
51195 2
51195 2
51196 4
51196 4
51197 4
51197 4
51198 3
51198 3
51199 3
51199 3
51200 3
51200 3
51201 1
51201 1
51212 1
51212 1
51213 5
51213 5
51214 3
51214 3
51215 3
51215 3
51216 4
51216 4
51217 6
51217 6
51218 4
51218 4
51219 3
51219 3
51220 3
51220 3
51225 2
51225 2
51226 5
51226 5
51227 5
51227 5
51228 2
51228 2
51229 2
51229 2
51230 1
51230 1
51231 2
51231 2
51239 3
51239 3
51240 2
51240 2
51241 2
51241 2
51242 2
51242 2
51243 1
51243 1
51249 3
51249 3
51250 2
51250 2
51251 3
51251 3
51252 1
51252 1
51253 2
51253 2
51273 4
51273 4
51274 5
51274 5
51275 2
51275 2
51276 2
51276 2
51277 1
51277 1
51346 10
51346 10
51347 46
51347 46
51350 20
51350 20
51351 6
51351 6
51352 2
51352 2
51390 8
51390 8
51391 6
51391 6
51392 7
51392 7
51393 3
51393 3
51394 1
51394 1
51444 5
51444 5
51445 1
51445 1
51446 3
51446 3
51447 2
51447 2
51448 6
51448 6
51449 2
51449 2