UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B+nN0ftpZ8kD1shHDE8UgWYWlGKTSAnt3+2pgXLD4BY='
WHERE
key_id = '637093e414c104f7e14a94c10e5a033e87fe8ede96adf78dc648ee74f5720cb8'
AND (
token = 'B+nN0ftpZ8kD1shHDE8UgWYWlGKTSAnt3+2pgXLD4BY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)