SELECT 
  c.*, 
  IF (c.location_id != 427, 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 = 10 
WHERE 
  1 
  AND c.position IN ('TOP_PANEL', 'HEADER', 'FOOTER')

Query time 0.00200

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
1530 421 TOP_PANEL 16 top-grid Y A 0
1531 421 HEADER 16 header-grid Y A 0
1533 421 FOOTER 16 Y A 0