Under the current system, anyone earning over 15,000 baht per month, so a lot of bank and office workers in your examples, with 20+ years of payments will receive an SSO pension of 4-5,000 baht. Lower salaries with lower contributions will receive less.
And most farm workers, construction workers and people on the street are probably not paying into the SSO system.
Employees are also entitled to receive a retirement severance payment from the employer based on their years of service and final salary. So if they've been with a company for 20 years or more, they get a payment equivalent to 400 days' salary, 10 years is 300 days etc.
It maybe of interest to some here that working continuously for an employer on two-year contracts, for example, your years still add up for the final severance payment.