UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+/lrwcQMnD/pJPYR83f47LxkVO4fslWy/PNG9Rq/M6I='
WHERE
key_id = '4359828389741eef33d7b85bf33e92ca39f96fbe4134bd0a4206f449e06212a4'
AND (
token = '+/lrwcQMnD/pJPYR83f47LxkVO4fslWy/PNG9Rq/M6I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)