You need more evaluation as to when and why your knee is paining.
Kindly get X-ray of both knee AP.view in standing and lateral view of painful knee.
At 32 years, knee pain during Namaz , could be a result of several causes related ligament, cartilage or muscle and bone
Next Steps
Consult an Orthopedic surgeon in person
Health Tips
may be sit on chair for namaz but better you consult an orthopaedic surgeon