SELECT 
  q_images.*, 
  q_images_links.*, 
  q_common_descriptions.description AS alt, 
  q_images.image_id AS images_image_id 
FROM 
  q_images_links 
  LEFT JOIN q_images ON q_images_links.detailed_id = q_images.image_id 
  LEFT JOIN q_common_descriptions ON q_common_descriptions.object_id = q_images.image_id 
  AND q_common_descriptions.object_holder = 'images' 
  AND q_common_descriptions.lang_code = 'en' 
WHERE 
  q_images_links.object_type = 'product' 
  AND q_images_links.type = 'M' 
  AND q_images_links.object_id IN (
    '31025', '31026', '31027', '31028', 
    '31029', '31030', '31031', '31032', 
    '31033', '31034', '31035', '31036', 
    '31037', '31038', '31039', '31040'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00090

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "136.01"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "25.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "q_images_links",
            "access_type": "range",
            "possible_keys": [
              "object_id"
            ],
            "key": "object_id",
            "used_key_parts": [
              "object_id",
              "object_type",
              "type"
            ],
            "key_length": "81",
            "rows_examined_per_scan": 25,
            "rows_produced_per_join": 25,
            "filtered": "100.00",
            "index_condition": "((`portal`.`q_images_links`.`object_type` = 'product') and (`portal`.`q_images_links`.`type` = 'M') and (`portal`.`q_images_links`.`object_id` in ('31025','31026','31027','31028','31029','31030','31031','31032','31033','31034','31035','31036','31037','31038','31039','31040')))",
            "cost_info": {
              "read_cost": "46.01",
              "eval_cost": "5.00",
              "prefix_cost": "51.01",
              "data_read_per_join": "2K"
            },
            "used_columns": [
              "pair_id",
              "object_id",
              "object_type",
              "image_id",
              "detailed_id",
              "type",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "q_images",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "image_id"
            ],
            "key_length": "4",
            "ref": [
              "portal.q_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 25,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "25.00",
              "eval_cost": "5.00",
              "prefix_cost": "81.01",
              "data_read_per_join": "19K"
            },
            "used_columns": [
              "image_id",
              "image_path",
              "image_x",
              "image_y",
              "is_high_res"
            ],
            "attached_condition": "<if>(is_not_null_compl(q_images), (`portal`.`q_images_links`.`detailed_id` = `portal`.`q_images`.`image_id`), true)"
          }
        },
        {
          "table": {
            "table_name": "q_common_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "lang_code",
              "object_holder"
            ],
            "key_length": "107",
            "ref": [
              "portal.q_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 25,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "25.00",
              "eval_cost": "5.00",
              "prefix_cost": "111.01",
              "data_read_per_join": "14K"
            },
            "used_columns": [
              "object_id",
              "description",
              "lang_code",
              "object_holder"
            ],
            "attached_condition": "<if>(is_not_null_compl(q_common_descriptions), (`portal`.`q_common_descriptions`.`object_id` = `portal`.`q_images`.`image_id`), true)"
          }
        }
      ]
    }
  }
}

Result

image_id image_path image_x image_y is_high_res pair_id object_id object_type detailed_id type position alt images_image_id
0 51AnL7W1R4L._AC_UL436_.jpg 436 436 N 49311 31034 product 51272 M 0 51272
0 41-z1Lggf0L._AC_UL436_.jpg 436 315 N 49313 31036 product 51274 M 0 51274
0 41WfvqLjFmL._AC_UL436_.jpg 436 394 N 49317 31032 product 51278 M 0 51278
0 61CSWLLjcIL._AC_UL436_.jpg 436 436 N 49318 31031 product 51279 M 0 51279
0 71zNY_AgC3L._AC_UL436_.jpg 436 436 N 49324 31027 product 51285 M 0 51285
0 71i2ZcLsfFL._SL1000_.jpg 1000 1000 N 49645 31040 product 51606 M 0 51606
0 71IdWxtyq6L._SL1000_.jpg 1000 1000 N 49646 31039 product 51607 M 0 51607
0 61gl39Ezl8L._SL1000_.jpg 1000 1000 N 49648 31038 product 51609 M 0 51609
0 51jLKhuY1AL.jpg 500 500 N 49649 31037 product 51610 M 0 51610
0 oil_bottle_web.jpg 640 626 N 51700 31028 product 53661 M 0 53661
0 81l2dR7U0OL._SL1000_.jpg 1000 1000 N 65533 31035 product 67484 M 0 67484