Civil disobedience can be justified in a functioning democracy. Civil disobedience is often a necessary evil to bring about change in the government. If a democracy is just functioning, that means that there is still a lot of room for change that can be brought about by the people. Therefore, change can be brought by breaking the law.
It is easy to assume that a democratic society is built to help out most people of that particular society, but it is not always the case. Civil disobedience can be a simple act of protest against oppressors of said society that never have to answer to anyone. The civilians have to impose on these people their views and thoughts however they can.
First, the people in the democracy who are being civilly disobedient had the right to vote for the person or law that they don't agree with. You can't just not vote for something and then be disobedient when it doesn't go your way. You didn't vote. Second of all, the law or person you don't agree with can be taken down by another person. That is the beauty of democracy. Anything can be changed when someone is replaced.