Definitely lying, but not all realize they lying because many are also lying to themselves.
Discussion
I would say they know they are lying, and you could prove this by offering them a bet which they will turn down. If they believed it, they’d make the bet. At least that’s my experience.
Some (most probably) definitely know they are lying, but I don't believe all do. I've seen people that I am pretty certain lie to themselves. People, whose jobs and position depend on believing the lie, frequently lie to themselves because they don't want to admit that they are cheating/harming in order to help themselves. Doctors and researchers are perfect examples. They should know, but their views of themselves depend on not seeing things. Some know and choose to do the wrong thing for their own personal good, but some lie to themselves that they are doing good when they know enough that they should realize they are doing harm.
There's a lack of reflection that creates this sort of middle ground, where wrong views are uncritically repeated without being believed or disbelieved. It's a form of bad faith that isn't exactly the same as lying to oneself.