SELECT 
  cscart_images.*, 
  cscart_images_links.*, 
  cscart_common_descriptions.description AS alt, 
  cscart_images.image_id AS images_image_id 
FROM 
  cscart_images_links 
  LEFT JOIN cscart_images ON cscart_images_links.detailed_id = cscart_images.image_id 
  LEFT JOIN cscart_common_descriptions ON cscart_common_descriptions.object_id = cscart_images.image_id 
  AND cscart_common_descriptions.object_holder = 'images' 
  AND cscart_common_descriptions.lang_code = 'vi' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'M' 
  AND cscart_images_links.object_id IN (
    16791, 16790, 16789, 16788, 16787, 5472, 
    16560, 16559, 16558, 16557, 16556, 
    5588, 16813, 16812, 16811, 16810, 5462, 
    16550, 16549, 16548, 16547, 16546, 
    5590, 16776, 16775, 16774, 16773, 5478, 
    15709, 15708, 15707, 15706, 15705, 
    15704, 15703, 15702, 15701, 5957, 15677, 
    15676, 15675, 15674, 15673, 15672, 
    15671, 15670, 15669, 5961, 16802, 16801, 
    16800, 16799, 16798, 16797, 5467, 35733, 
    35879, 35880, 16826, 16825, 16824, 
    16823, 16822, 5448, 18331, 18330, 18329, 
    18328, 18327, 4363, 15716, 15715, 15714, 
    15713, 15712, 15711, 15710, 5956, 18337, 
    18336, 18335, 4361, 16821, 16820, 5451, 
    16772, 16771, 16770, 16769, 16768, 
    5479, 18320, 4366, 18338, 4360, 16545, 
    16544, 16543, 16542, 16541, 5591, 16757, 
    16756, 16755, 16754, 5485, 16565, 16564, 
    16563, 16562, 16561, 5587, 15662, 15661, 
    15660, 15659, 5963
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00405

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "read_sorted_file": {
          "filesort": {
            "sort_key": "cscart_images_links.position, cscart_images_links.pair_id",
            "table": {
              "table_name": "cscart_images_links",
              "access_type": "ALL",
              "possible_keys": ["object_id"],
              "rows": 125,
              "filtered": 93.59999847,
              "attached_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (16791,16790,16789,16788,16787,5472,16560,16559,16558,16557,16556,5588,16813,16812,16811,16810,5462,16550,16549,16548,16547,16546,5590,16776,16775,16774,16773,5478,15709,15708,15707,15706,15705,15704,15703,15702,15701,5957,15677,15676,15675,15674,15673,15672,15671,15670,15669,5961,16802,16801,16800,16799,16798,16797,5467,35733,35879,35880,16826,16825,16824,16823,16822,5448,18331,18330,18329,18328,18327,4363,15716,15715,15714,15713,15712,15711,15710,5956,18337,18336,18335,4361,16821,16820,5451,16772,16771,16770,16769,16768,5479,18320,4366,18338,4360,16545,16544,16543,16542,16541,5591,16757,16756,16755,16754,5485,16565,16564,16563,16562,16561,5587,15662,15661,15660,15659,5963)"
            }
          }
        }
      },
      {
        "table": {
          "table_name": "cscart_images",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "4",
          "used_key_parts": ["image_id"],
          "ref": ["dev_db.cscart_images_links.detailed_id"],
          "rows": 1,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "cscart_common_descriptions",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "107",
          "used_key_parts": ["object_id", "lang_code", "object_holder"],
          "ref": ["dev_db.cscart_images.image_id", "const", "const"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "trigcond(cscart_common_descriptions.object_id = cscart_images.image_id and cscart_common_descriptions.object_holder = 'images' and cscart_common_descriptions.lang_code = 'vi' and trigcond(cscart_images.image_id is not null))"
        }
      }
    ]
  }
}