SELECT 
  * 
FROM 
  q_bm_containers as c 
  LEFT JOIN q_bm_grids as g ON g.container_id = c.container_id 
WHERE 
  1 
  AND g.container_id IN (253, 254, 267, 256) 
ORDER BY 
  g.order, 
  g.parent_id, 
  g.grid_id ASC

Query time 0.00076

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "27.21"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "8.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "c",
            "access_type": "range",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "container_id"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 4,
            "rows_produced_per_join": 4,
            "filtered": "100.00",
            "index_condition": "(`portal`.`c`.`container_id` in (253,254,267,256))",
            "cost_info": {
              "read_cost": "8.81",
              "eval_cost": "0.80",
              "prefix_cost": "9.61",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "container_id",
              "location_id",
              "position",
              "width",
              "user_class",
              "linked_to_default",
              "status",
              "company_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "g",
            "access_type": "ref",
            "possible_keys": [
              "container_id"
            ],
            "key": "container_id",
            "used_key_parts": [
              "container_id"
            ],
            "key_length": "3",
            "ref": [
              "portal.c.container_id"
            ],
            "rows_examined_per_scan": 2,
            "rows_produced_per_join": 8,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "8.00",
              "eval_cost": "1.60",
              "prefix_cost": "19.21",
              "data_read_per_join": "6K"
            },
            "used_columns": [
              "grid_id",
              "container_id",
              "parent_id",
              "order",
              "width",
              "offset",
              "user_class",
              "omega",
              "alpha",
              "wrapper",
              "content_align",
              "html_element",
              "clear",
              "status",
              "extended",
              "ab__show_in_tabs",
              "ab__use_ajax"
            ]
          }
        }
      ]
    }
  }
}

Result

container_id location_id position width user_class linked_to_default status company_id grid_id parent_id order offset omega alpha wrapper content_align html_element clear extended ab__show_in_tabs ab__use_ajax
253 64 TOP_PANEL 16 ypi-top-panel Y A 0 273 0 0 0 1 1 RIGHT div 1 E N N
253 64 TOP_PANEL 3 ypi-logo Y A 0 276 0 0 0 0 1 FULL_WIDTH div 0 0 N N
253 64 TOP_PANEL 4 phone-links-wrap Y A 0 277 0 0 0 0 0 FULL_WIDTH div 0 0 N N
253 64 TOP_PANEL 9 ypi-cart-user-wrap Y A 0 278 0 0 0 1 0 RIGHT div 1 0 N N
254 64 HEADER 16 top-menu-grid Y A 0 279 0 0 0 1 1 FULL_WIDTH div 1 E N N
256 64 FOOTER 16 ty-footer-grid__full-width ty-footer-menu Y A 0 285 0 0 0 1 1 FULL_WIDTH div 1 0 N N
256 64 FOOTER 16 ty-footer-grid__full-width footer-copyright Y A 0 290 0 0 0 1 1 FULL_WIDTH div 1 E N N
267 67 CONTENT 4 side-grid Y A 0 311 0 0 0 0 1 FULL_WIDTH div 0 O N N
267 67 CONTENT 12 main-content-grid Y A 0 312 0 0 0 1 0 FULL_WIDTH div 1 O N N
267 67 CONTENT 16 h-filters Y A 0 313 0 0 0 1 1 FULL_WIDTH div 1 0 N N
253 64 TOP_PANEL 4 ypi-title-to-sore Y A 0 274 273 0 0 0 1 FULL_WIDTH div 0 0 N N
253 64 TOP_PANEL 12 ypi-top-links Y A 0 275 273 0 0 1 0 RIGHT div 1 0 N N
256 64 FOOTER 5 Y A 0 286 285 0 0 0 1 FULL_WIDTH div 0 0 N N
256 64 FOOTER 4 my-account-grid Y A 0 287 285 0 0 0 0 FULL_WIDTH div 0 0 N N
256 64 FOOTER 3 footer-store-grid Y A 0 288 285 0 0 0 0 FULL_WIDTH div 0 0 N N
256 64 FOOTER 4 about-grid Y A 0 289 285 0 0 1 0 FULL_WIDTH div 1 0 N N
256 64 FOOTER 8 Y A 0 291 290 0 0 0 1 LEFT div 0 0 N N
256 64 FOOTER 8 Y A 0 292 290 0 0 1 0 RIGHT div 1 0 N N