Le plus simple serait
String query = "select LastModified from CacheTable where url = '" + url +"'";
Vous devez cependant utiliser des variables de liaison :
String query = "select LastModified from CacheTable where url = ?";
prepStmt = conn.prepareStatement(query);
prepStmt.setString(1, url);
rs = prepStmt.executeQuery();