Always sarcastic / pejorative — never use it to refer to an official to their face. The 老爷 (lǎoye, 'master / lord') ending mocks the official as a feudal-style aristocrat detached from the people.
culture
Frequently appears in Chinese political rhetoric criticizing 官僚主义 (guānliáozhǔyì, 'bureaucratism'). The Communist Party itself has used the phrase 反对官老爷作风 ('oppose the lordly-official style') in self-criticism campaigns since the 1950s.