select rows older then column DATETIME - INT value of other column in single query
If sendgap is the number of seconds, the correct syntax is this

SELECT * FROM table WHERE lastsendattempt &lt;= (NOW() - INTERVAL sendgap SECOND);