UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '13jDn5PisC7pLvPtyt9M+lxLyTOwwt96jsM7xcqQYy4='
WHERE
key_id = '4496ef294b8054da7bbb3c2312ccc51576e5bacf034a372594d6e62ed9dda699'
AND (
token = '13jDn5PisC7pLvPtyt9M+lxLyTOwwt96jsM7xcqQYy4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)