MySQL query to fetch data by lang_id (if not fetch by default lang_id = 0)
What you have is fine.

Another way to write this (assuming that for every page_id, there is always a row with the default lang_id = 0), is to use a LEFT JOIN. There should be minimal if any difference in performance but this is easily extendable for multiple requests:

select d.page_id,
       coalesce(p.lang_id, d.lang_id)       as lang_id,     -- ours or the default
       coalesce(p.page_title, d.page_title) as page_title   -- ours or the default
from lang_pages as d               -- the default
  left join lang_pages as p        -- our language
    on  p.lang_id = &lt;lang_id&gt; 
    and p.page_id = d.page_id
where d.lang_id = 0 
  and d.page_id = &lt;page_id&gt;             -- one page or
--  and d.page_id in (1, 3, 7, ...)     -- possible other criteria
 ;