UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iyUXebwLCzX+mxKENKEZMZ+2nTJ1crUhHZwwI3oLjv4='
WHERE
key_id = '6f2e7bbb6d4f8be7d562c402357d4ea0f065bac9df2498805643b0689cd07cfe'
AND (
token = 'iyUXebwLCzX+mxKENKEZMZ+2nTJ1crUhHZwwI3oLjv4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)