UK court jails men over terror plot