Hi.
Thanks for your query.
Noted the history of taking lot of iron tablets, and cocodymal, both causing constipated . Not resolved by senna and hence took a large dose of 
Lactulose, which overworked the bowel causing passing only mucus, extreme pain in anus and 
coccyx are.
- This probably suggests impacted fecoliths and the reaction thereof causing the excessive mucus secretion, which due to its stick nature is passing out but not the stuck fecoliths. This causes pains as you have described. 
I would advise you in such a situation the following:
- Go to ER.
X-ray of the abdomen in standing position to see for the fecal load.
Saline and soap enema may work well. Anything less than this  like the phosphate enema may or may not work.
Colonoscopy later after the evaluation is complete should be done to rule out any pathology like stricture, cancer or so.
Continue taking the laxatives till you get 
regular bowel movements.
Stop the foods and beverages that instigate or enhance 
constipation.