Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
What is the lowest rank that has goals per match less than 1.237, real madrid as the club, goals less than 53, with apps greater than 40?

### Inputs:
table_name: table, columns: ['Rank', 'Name', 'Season', 'Club', 'Goals', 'Apps', 'Goals per Match']

### Response:
SELECT MIN Rank FROM table WHERE Goals per Match < 1.237 AND Club = real madrid AND Goals < 53 AND Apps > 40