UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SOJp3nV9+cn/LiKZuHMfzBmAfKa7L6nNXZhPusSn5ow='
WHERE
key_id = '80c2187c599432f272d1133d0f6fe7922208ecaefd87b203fd69a78cb6f77664'
AND (
token = 'SOJp3nV9+cn/LiKZuHMfzBmAfKa7L6nNXZhPusSn5ow='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)