SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_sum_products_amount 
WHERE 
  1 
  AND product_id IN (
    130, 51106, 51107, 51112, 51111, 51110, 
    51109, 51108, 128, 51118, 51117, 51116, 
    51115, 51114, 51113, 51220, 51219, 
    51218, 51217, 51216, 146, 51448, 51449, 
    51232, 12, 51238, 51237, 51236, 51235, 
    51234, 51233, 51243, 51242, 51241, 
    51240, 51239, 36, 51246, 51245, 51244, 
    35, 51248, 51247, 51253, 51252, 51251, 
    51250, 51249, 34, 51256, 51255, 51254, 
    33, 32, 51265, 51264, 51263, 51262, 
    51261, 51260, 51259, 110, 51273, 147, 
    51277, 51276, 51275, 51274, 51281, 
    51280, 51279, 51278, 51282, 7, 16, 114, 
    84, 89, 51390, 51391, 51392, 51393, 
    51394
  )

Query time 0.00138

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "92.76"
    },
    "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": 160,
      "rows_produced_per_join": 160,
      "filtered": "100.00",
      "index_condition": "(`test_uchur_k`.`cscart_warehouses_sum_products_amount`.`product_id` in (130,51106,51107,51112,51111,51110,51109,51108,128,51118,51117,51116,51115,51114,51113,51220,51219,51218,51217,51216,146,51448,51449,51232,12,51238,51237,51236,51235,51234,51233,51243,51242,51241,51240,51239,36,51246,51245,51244,35,51248,51247,51253,51252,51251,51250,51249,34,51256,51255,51254,33,32,51265,51264,51263,51262,51261,51260,51259,110,51273,147,51277,51276,51275,51274,51281,51280,51279,51278,51282,7,16,114,84,89,51390,51391,51392,51393,51394))",
      "cost_info": {
        "read_cost": "76.76",
        "eval_cost": "16.00",
        "prefix_cost": "92.76",
        "data_read_per_join": "2K"
      },
      "used_columns": [
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
7 2
7 2
12 3
12 3
16 23
16 23
32 1
32 1
33 2
33 2
34 3
34 3
35 3
35 3
36 3
36 3
84 18
84 18
89 8
89 8
110 3
110 3
114 25
114 25
128 3
128 3
130 2
130 2
146 4
146 4
147 2
147 2
51106 1
51106 1
51107 3
51107 3
51108 3
51108 3
51109 2
51109 2
51110 2
51110 2
51111 1
51111 1
51112 1
51112 1
51113 2
51113 2
51114 2
51114 2
51115 3
51115 3
51116 2
51116 2
51117 2
51117 2
51118 1
51118 1
51216 4
51216 4
51217 6
51217 6
51218 4
51218 4
51219 3
51219 3
51220 3
51220 3
51232 5
51232 5
51233 6
51233 6
51234 3
51234 3
51235 2
51235 2
51236 3
51236 3
51237 1
51237 1
51238 1
51238 1
51239 3
51239 3
51240 2
51240 2
51241 2
51241 2
51242 2
51242 2
51243 1
51243 1
51244 6
51244 6
51245 6
51245 6
51246 2
51246 2
51247 2
51247 2
51248 2
51248 2
51249 3
51249 3
51250 2
51250 2
51251 3
51251 3
51252 1
51252 1
51253 2
51253 2
51254 2
51254 2
51255 1
51255 1
51256 2
51256 2
51259 4
51259 4
51260 8
51260 8
51261 5
51261 5
51262 2
51262 2
51263 4
51263 4
51264 3
51264 3
51265 3
51265 3
51273 4
51273 4
51274 5
51274 5
51275 2
51275 2
51276 2
51276 2
51277 1
51277 1
51278 4
51278 4
51279 5
51279 5
51280 3
51280 3
51281 2
51281 2
51282 1
51282 1
51390 8
51390 8
51391 6
51391 6
51392 7
51392 7
51393 3
51393 3
51394 1
51394 1
51448 6
51448 6
51449 2
51449 2