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 (
    22173, 22172, 1943, 20698, 20697, 20696, 
    20695, 20694, 20693, 20692, 20691, 
    20690, 2873, 20709, 20708, 20707, 20706, 
    2854, 22269, 22268, 22183, 22178, 22177, 
    22176, 22175, 22174, 20705, 2857, 22227, 
    22220, 22219, 22218, 22217, 22216, 
    22215, 22214, 22171, 1945, 22267, 22266, 
    22265, 22264, 22263, 1939, 1946, 44946, 
    45163, 45166, 45169, 45172, 45175, 
    45178, 45181, 45161, 45162, 44994, 
    44943, 44988, 44991, 45006, 45003, 
    45000, 44997, 44986, 44987, 44944, 
    45117, 45120, 45123, 45126, 45129, 
    45132, 45135, 45115, 45116, 44947, 
    45186, 45189, 45192, 45195, 45198, 
    45201, 45204, 45184, 45185, 47974, 
    48006, 48007, 48008, 48009, 48010, 
    48011, 48012, 48013, 44945, 45140, 
    45143, 45146, 45149, 45152, 45155, 
    45158, 45138, 45139, 44281, 44328
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00155

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": 84.80000305,
              "attached_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (22173,22172,1943,20698,20697,20696,20695,20694,20693,20692,20691,20690,2873,20709,20708,20707,20706,2854,22269,22268,22183,22178,22177,22176,22175,22174,20705,2857,22227,22220,22219,22218,22217,22216,22215,22214,22171,1945,22267,22266,22265,22264,22263,1939,1946,44946,45163,45166,45169,45172,45175,45178,45181,45161,45162,44994,44943,44988,44991,45006,45003,45000,44997,44986,44987,44944,45117,45120,45123,45126,45129,45132,45135,45115,45116,44947,45186,45189,45192,45195,45198,45201,45204,45184,45185,47974,48006,48007,48008,48009,48010,48011,48012,48013,44945,45140,45143,45146,45149,45152,45155,45158,45138,45139,44281,44328)"
            }
          }
        }
      },
      {
        "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))"
        }
      }
    ]
  }
}