Ex-convict jailed 40yrs for robbery