Imagine you are at church where there are adults and children in the audience. The pastor is preaching a sermon and he addresses the adults in the congregation then he says, "Children, always obey your parents." It is assumed he is now addressing the children in the audience. Good question though but I don't believe Paul meant grown-up children to obey their parents like young children are asked to do.
Children (under 18 for example) is determined from context. Since adult Christians would not obey their parents if their parents were pagans, it is referring to young children. "In the Lord" is the keyword. If the parent tells their children to obey Jesus and hisHis Father, that is "in the Lord". Heck, even an adult child should obey their parents IF it is "in the Lord". He is not saying obeying your parents no matter what they tell you.