UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'itzo/dCvAUB0FOBDP6gmei5je+fBgKkXtyh3xkXQWtc='
WHERE
key_id = '63e3c86c2e8d2842e389477525380409620ee941d4590917bfde6e4146afddb3'
AND (
token = 'itzo/dCvAUB0FOBDP6gmei5je+fBgKkXtyh3xkXQWtc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)