SELECT 
  c.*, 
  IF (c.location_id != 269, 0, 1) as `default` 
FROM 
  cscart_bm_containers as c 
  INNER JOIN cscart_bm_locations as l ON c.location_id = l.location_id 
  AND l.is_default = 1 
  AND l.layout_id = 2 
WHERE 
  1 
  AND c.position IN ('TOP_PANEL', 'HEADER', 'FOOTER')

Query time 0.00194

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE c ALL 524 Using where
1 SIMPLE l eq_ref PRIMARY PRIMARY 3 mahm3t_cs443.c.location_id 1 Using where

Result

container_id location_id position width user_class linked_to_default status default
906 265 TOP_PANEL 16 top-grid Y A 0
907 265 HEADER 16 header-grid Y A 0
909 265 FOOTER 16 Y A 0