Once upon a time is used to indicate that something happened or existed a long time ago or in an imaginary world. It is often used at the beginning of children's stories.
'Once upon a time,' he began, 'there was a man who had everything.'
Once upon a time, asking a woman if she has a job was quite a straightforward question.