SELECT 
  * 
FROM 
  cscart_bm_containers as c 
  LEFT JOIN cscart_bm_grids as g ON g.container_id = c.container_id 
WHERE 
  1 
  AND g.container_id IN (505, 506, 519, 508) 
ORDER BY 
  g.order, 
  g.parent_id, 
  g.grid_id ASC

Query time 0.00042

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "29.81"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "20.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": "(`cscartdevel`.`c`.`container_id` in (505,506,519,508))",
            "cost_info": {
              "read_cost": "2.41",
              "eval_cost": "0.40",
              "prefix_cost": "2.81",
              "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": [
              "cscartdevel.c.container_id"
            ],
            "rows_examined_per_scan": 5,
            "rows_produced_per_join": 20,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "5.00",
              "eval_cost": "2.00",
              "prefix_cost": "9.81",
              "data_read_per_join": "17K"
            },
            "used_columns": [
              "grid_id",
              "container_id",
              "parent_id",
              "order",
              "width",
              "offset",
              "user_class",
              "omega",
              "alpha",
              "wrapper",
              "content_align",
              "html_element",
              "clear",
              "status",
              "abt__ut2_extended",
              "abt__ut2_padding",
              "abt__ut2_show_blocks_in_tabs",
              "abt__ut2_use_lazy_load"
            ]
          }
        }
      ]
    }
  }
}

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 abt__ut2_extended abt__ut2_padding abt__ut2_show_blocks_in_tabs abt__ut2_use_lazy_load
505 127 TOP_PANEL 3 top-grid-location N D 0 838 0 0 0 0 1 LEFT div 0 0 no N
505 127 TOP_PANEL 13 top-links-grid N A 0 839 0 0 0 1 0 RIGHT div 1 0 no N
506 127 HEADER 16 top-menu-grid Y A 0 840 0 0 0 1 1 FULL_WIDTH div 1 O no N
508 127 FOOTER 16 ty-footer-menu b-top Y A 0 847 0 0 0 1 1 FULL_WIDTH div 1 E no N
508 127 FOOTER 16 ty-footer-grid__full-width footer-copyright Y A 0 852 0 0 0 1 1 FULL_WIDTH div 1 O no N
519 130 CONTENT 16 top-sticky-panel__filters Y A 0 906 0 0 0 1 1 FULL_WIDTH div 1 E no N
506 127 HEADER 4 top-logo Y A 0 841 840 0 0 0 1 FULL_WIDTH div 0 0 no N
508 127 FOOTER 4 my-account-grid Y A 0 848 847 0 0 0 1 LEFT div 0 0 no N
508 127 FOOTER 4 demo-store-grid Y A 0 849 847 0 0 0 0 LEFT div 0 0 no N
508 127 FOOTER 4 customer-service-grid Y A 0 850 847 0 0 0 0 LEFT div 0 0 no N
508 127 FOOTER 4 about-grid Y A 0 851 847 0 0 1 0 LEFT div 1 0 no N
508 127 FOOTER 8 Y A 0 853 852 0 0 0 1 LEFT div 0 0 no N
508 127 FOOTER 8 Y A 0 854 852 0 0 1 0 RIGHT div 1 0 no N
506 127 HEADER 16 second-header-grid top-menu-grid Y A 0 844 0 1 0 1 1 FULL_WIDTH div 1 E no N
519 130 CONTENT 16 ut2__subcategories Y A 0 908 0 1 0 1 1 FULL_WIDTH div 1 E no N
506 127 HEADER 9 top-search Y A 0 842 840 1 0 0 0 FULL_WIDTH div 0 0 no N
519 130 CONTENT 16 Y A 0 907 0 2 0 1 1 FULL_WIDTH div 1 F no N
506 127 HEADER 3 top-buttons top-button-cart Y A 0 843 840 2 0 1 0 FULL_WIDTH div 1 0 no N
519 130 CONTENT 9 main-content-grid Y A 0 909 0 3 0 0 1 FULL_WIDTH div 0 0 no N
519 130 CONTENT 7 side-grid Y A 0 910 0 4 0 1 0 FULL_WIDTH div 1 0 ut2-bottom no N
519 130 CONTENT 16 b-top Y A 0 911 0 5 0 1 1 FULL_WIDTH div 1 O ut2-top-bottom no N