The statement shall be deemed unfit for this role makes no allowance for any reasonable adjustments to be made under the disability discrimination provisions of the Equality Act 2010. The statement Applicants who are renewing their medical and have developed the medical condition XYZ may be deemed fit for this role would make it very hard for the employer to claim that applicants with condition XYZ cannot do the job, as they already have employees with that condition doing the work.
If the purpose of the first statement is to save the employer the cost of the medical assessment of applicants then the statement (and the action) would almost certainly be discrimimatory, as a medical assessment for an applicant is not an onerous burden on an employer, and if this is a safety-critical role then all applicants would normally be assessed.
The Health and Safety Executive says:
Health and safety is sometimes used as an excuse to justify
discrimination against disabled workers. This should not happen. 
The Equality Act 2010 (replaces Disability Discrimination Act 1995) sets out legal requirements for employers to make ‘reasonable adjustments’ for disabled workers.
Health and Safety at Work Act 1974 and the Management of Health and Safety at Work Regulations applies to all workers, regardless of whether they are disabled or not. This includes a provision in the Management of Health and Safety at Work Regulations that employers must carry out a suitable and suffcient risk assessment and take into
account their employees’ capabilities.
Safety reps need to be aware that some employers have used health and
safety regulations to discriminate against disabled people. While the
Equality Act 2010 provides protections for some disabled workers,
employers have still found loopholes allowing them to exclude disabled
workers based upon projected safety concerns. 
Indirect discrimination can occur where a workplace rule, practice or procedure is applied to all employees, but disadvantages those who are disabled. A disabled employee or job applicant claiming indirect discrimination must show how they have been personally disadvantaged, as well as how the discrimination has or would disadvantage other disabled employees or job candidates.
In some limited circumstances, indirect discrimination may be
justified if it is necessary for the business to work. For example, an
employer may reject an applicant with a severe back problem where
heavy manual lifting is an essential part of the job. 
An employer failing to make 'reasonable adjustments' for a disabled
job applicant or employee is one of the most common types of
disability discrimination. If adjustments are 'reasonable', an
employer must make them to ensure its workplace or practices do
not disadvantage a disabled job applicant or employee already with the
Fixed standards which an employee must comply with or achieve are not necessarily discriminatory, but they may be if not restricted to the actual ability to do the work or achieve a professionally accepted standard.
Reasonable adjustments do not have to be made if they will affect
a competence standard. These are academic, medical, or other standards applied to determine whether a student has reached a
particular level of competence or ability
Competence standards only apply if they determine the level of ability
required in the specific circumstances. 
There are also occasions where discriminatory acts can be justified:
In practice, the employer will normally need to demonstrate genuine
economic, technical and/ or organisational reasons behind any such act
of disability related discrimination as outweighing the effects of the
discrimination. They must also show that their duty with regards to
reasonable adjustments has been discharged i.e. an employer will not
be justified in treating a disabled employee less favourably if a
reasonable adjustment would have prevented this treatment.
It might be that in the particular role existing employees can be found fit to work because they have been working for a previous period and their condition and performance has been monitored and found satisfactory. It might be that job applicants with the condition should be offered alternative work for a similar prior period of monitoring before being offered the specific role.