UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tlncnSupdF4zXfkZ+ir1jE4iSjFpZDfQkRUnDvxR3fo='
WHERE
key_id = 'a21387ec3073a7a0b3c529edec3b00d0cd5f19c822e47894d5c10350fa1a5bdd'
AND (
token = 'tlncnSupdF4zXfkZ+ir1jE4iSjFpZDfQkRUnDvxR3fo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)